Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 6edc963
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/plugins/georeferencer/qgspointdialog.cpp
Expand Up @@ -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))
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 6edc963

Please sign in to comment.