Skip to content

Commit

Permalink
fix for georeferencing with linear transformation
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10436 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Mar 28, 2009
1 parent e6b27a9 commit e9054ed
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/plugins/georeferencer/qgspointdialog.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit e9054ed

Please sign in to comment.