Skip to content

Commit

Permalink
Georeferencer: Fix a bug in GDAL script generation.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12966 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mmassing committed Feb 23, 2010
1 parent b7a47ca commit 2af331c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/plugins/georeferencer/qgsgeorefplugingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,17 +297,24 @@ void QgsGeorefPluginGui::generateGDALScript()
if (QgsGeorefTransform::Linear != mTransformParam
&& QgsGeorefTransform::Helmert != mTransformParam)
{
// CAVEAT: gdalwarpCommand*() rely on some member variables being set
// by gdal_translateCommand(), so this method must be called before
// gdalwarpCommand*()!
QString translateCommand = gdal_translateCommand();
QString gdalwarpCommand;
QString resamplingStr = convertResamplingEnumToString(mResamplingMethod);
if (QgsGeorefTransform::ThinPlateSpline == mTransformParam)
{
gdalwarpCommand = gdalwarpCommandTPS(resamplingStr, mCompressionMethod, mUseZeroForTrans,
mUserResX, mUserResY);
}
else
{
gdalwarpCommand = gdalwarpCommandGCP(resamplingStr, mCompressionMethod, mUseZeroForTrans,
polynomeOrder(mTransformParam),
mUserResX, mUserResY);

showGDALScript(2, gdal_translateCommand().toAscii().data(), gdalwarpCommand.toAscii().data());
}
showGDALScript(2, translateCommand.toAscii().data(), gdalwarpCommand.toAscii().data());
}
else
{
Expand Down

0 comments on commit 2af331c

Please sign in to comment.