[QGIS Commit] r10436 - trunk/qgis/src/plugins/georeferencer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Mar 28 09:25:11 EDT 2009


Author: mhugent
Date: 2009-03-28 09:25:11 -0400 (Sat, 28 Mar 2009)
New Revision: 10436

Modified:
   trunk/qgis/src/plugins/georeferencer/qgspointdialog.cpp
Log:
fix for georeferencing with linear transformation

Modified: trunk/qgis/src/plugins/georeferencer/qgspointdialog.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgspointdialog.cpp	2009-03-28 13:24:26 UTC (rev 10435)
+++ trunk/qgis/src/plugins/georeferencer/qgspointdialog.cpp	2009-03-28 13:25:11 UTC (rev 10436)
@@ -516,6 +516,23 @@
       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 );



More information about the QGIS-commit mailing list