Skip to content

Commit e9054ed

Browse files
author
mhugent
committed
fix for georeferencing with linear transformation
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10436 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent e6b27a9 commit e9054ed

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/plugins/georeferencer/qgspointdialog.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,23 @@ bool QgsPointDialog::generateWorldFileAndWarp()
516516
return false;
517517
}
518518
}
519+
else //MH: don't forget the linear transformation ;-)
520+
{
521+
double xOffset = 0;
522+
double yOffset = 0;
523+
QFile file( worldFileName );
524+
if(!file.open(QIODevice::WriteOnly))
525+
{
526+
return false;
527+
}
528+
QTextStream stream(&file);
529+
stream<<QString::number(pixelXSize, 'f', 15)<<endl
530+
<<0<<endl
531+
<<0<<endl
532+
<<QString::number(-pixelYSize, 'f', 15)<<endl
533+
<<QString::number((origin.x() - xOffset * pixelXSize), 'f', 15)<<endl
534+
<<QString::number((origin.y() + yOffset * pixelYSize), 'f', 15)<<endl;
535+
}
519536

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

0 commit comments

Comments
 (0)