Skip to content

Commit 8316063

Browse files
committed
Followup 71dc33, fix projective transform in georeferencer (fix #14551)
1 parent 33a5ee7 commit 8316063

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/plugins/georeferencer/qgsgeoreftransform.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -577,10 +577,11 @@ bool QgsProjectiveGeorefTransform::updateParametersFromGCPs( const QVector<QgsPo
577577
return false;
578578

579579
// HACK: flip y coordinates, because georeferencer and gdal use different conventions
580-
QVector<QgsPoint> flippedPixelCoords( pixelCoords.size() );
581-
for ( int i = 0; i < pixelCoords.size(); i++ )
580+
QVector<QgsPoint> flippedPixelCoords;
581+
flippedPixelCoords.reserve( pixelCoords.size() );
582+
Q_FOREACH ( const QgsPoint& coord, pixelCoords )
582583
{
583-
flippedPixelCoords[i] = pixelCoords[i];
584+
flippedPixelCoords << QgsPoint( coord.x(), -coord.y() );
584585
}
585586

586587
QgsLeastSquares::projective( mapCoords, flippedPixelCoords, mParameters.H );

0 commit comments

Comments
 (0)