Skip to content
Permalink
Browse files

Followup 71dc33, fix projective transform in georeferencer (fix #14551)

  • Loading branch information
nyalldawson committed Jun 15, 2016
1 parent 33a5ee7 commit 83160632ace41ef0306c903d977ef27283f83dcb
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/plugins/georeferencer/qgsgeoreftransform.cpp
@@ -577,10 +577,11 @@ bool QgsProjectiveGeorefTransform::updateParametersFromGCPs( const QVector<QgsPo
return false;

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

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

0 comments on commit 8316063

Please sign in to comment.
You can’t perform that action at this time.