Skip to content
Permalink
Browse files
Higher precision when writing worldfile / pointfile
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6888 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Apr 16, 2007
1 parent ac57362 commit 6edc963b88afb08d3faa53838d0d8843cb49c896
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/plugins/georeferencer/qgspointdialog.cpp
@@ -377,12 +377,12 @@ bool QgsPointDialog::generateWorldFile()
return false;
}
QTextStream stream(&file);
stream<<pixelXSize<<endl
stream<< QString::number(pixelXSize, 'f', 15) <<endl
<<0<<endl
<<0<<endl
<<-pixelYSize<<endl
<<QString::number(origin.x() - xOffset * pixelXSize, 'f')<<endl
<<QString::number(origin.y() + yOffset * pixelYSize, 'f')<<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
QFile pointFile(mLayer->source() + ".points");
if (pointFile.open(QIODevice::WriteOnly))
@@ -392,8 +392,8 @@ bool QgsPointDialog::generateWorldFile()
for (unsigned int i = 0; i < mapCoords.size(); ++i)
{
points<<(QString("%1\t%2\t%3\t%4").
arg(QString::number(mapCoords[i].x(), 'f')).
arg(QString::number(mapCoords[i].y(), 'f')).
arg(QString::number(mapCoords[i].x(), 'f', 15)).
arg(QString::number(mapCoords[i].y(), 'f', 15)).
arg(pixelCoords[i].x()).arg(pixelCoords[i].y()))<<endl;
}
}

0 comments on commit 6edc963

Please sign in to comment.