@@ -292,7 +292,8 @@ void QgsPointDialog::on_cmbTransformType_currentIndexChanged(const QString& valu
292292bool QgsPointDialog::generateWorldFile ()
293293{
294294 QgsPoint origin (0 , 0 );
295- double pixelSize = 1 ;
295+ double pixelXSize = 1 ;
296+ double pixelYSize = 1 ;
296297 double rotation = 0 ;
297298 double xOffset = 0.0 ;
298299 double yOffset = 0.0 ;
@@ -312,7 +313,7 @@ bool QgsPointDialog::generateWorldFile()
312313 {
313314 if (cmbTransformType->currentText () == tr (" Linear" ))
314315 {
315- QgsLeastSquares::linear (mapCoords, pixelCoords, origin, pixelSize );
316+ QgsLeastSquares::linear (mapCoords, pixelCoords, origin, pixelXSize, pixelYSize );
316317 }
317318 else if (cmbTransformType->currentText () == tr (" Helmert" ))
318319 {
@@ -327,7 +328,8 @@ bool QgsPointDialog::generateWorldFile()
327328 if (res == QMessageBox::Cancel)
328329 return false ;
329330
330- QgsLeastSquares::helmert (mapCoords, pixelCoords, origin, pixelSize, rotation);
331+ QgsLeastSquares::helmert (mapCoords, pixelCoords, origin, pixelXSize, rotation);
332+ pixelYSize = pixelXSize;
331333 }
332334 else if (cmbTransformType->currentText () == tr (" Affine" ))
333335 {
@@ -375,12 +377,12 @@ bool QgsPointDialog::generateWorldFile()
375377 return false ;
376378 }
377379 QTextStream stream (&file);
378- stream<<pixelSize <<endl
380+ stream<<pixelXSize <<endl
379381 <<0 <<endl
380382 <<0 <<endl
381- <<-pixelSize <<endl
382- <<QString::number (origin.x () - xOffset * pixelSize , ' f' )<<endl
383- <<QString::number (origin.y () + yOffset * pixelSize , ' f' )<<endl;
383+ <<-pixelYSize <<endl
384+ <<QString::number (origin.x () - xOffset * pixelXSize , ' f' )<<endl
385+ <<QString::number (origin.y () + yOffset * pixelYSize , ' f' )<<endl;
384386 // write the data points in case we need them later
385387 QFile pointFile (mLayer ->source () + " .points" );
386388 if (pointFile.open (QIODevice::WriteOnly))
0 commit comments