Skip to content
Permalink
Browse files

fix for georeferencing with linear transformation

git-svn-id: http://svn.osgeo.org/qgis/trunk@10436 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Mar 28, 2009
1 parent df3989e commit 040d2e62e112995185e3bbc7c79fe21286be2b12
Showing with 17 additions and 0 deletions.
  1. +17 −0 src/plugins/georeferencer/qgspointdialog.cpp
@@ -516,6 +516,23 @@ bool QgsPointDialog::generateWorldFileAndWarp()
return false;
}
}
else //MH: don't forget the linear transformation ;-)
{
double xOffset = 0;
double yOffset = 0;
QFile file( worldFileName );
if(!file.open(QIODevice::WriteOnly))
{
return false;
}
QTextStream stream(&file);
stream<<QString::number(pixelXSize, 'f', 15)<<endl
<<0<<endl
<<0<<endl
<<QString::number(-pixelYSize, 'f', 15)<<endl
<<QString::number((origin.x() - xOffset * pixelXSize), 'f', 15)<<endl
<<QString::number((origin.y() + yOffset * pixelYSize), 'f', 15)<<endl;
}

// write the data points in case we need them later
// saveGCPs( mapCoords, pixelCoords );

0 comments on commit 040d2e6

Please sign in to comment.
You can’t perform that action at this time.