Skip to content

Commit

Permalink
Followup 71dc33, fix projective transform in georeferencer (fix #14551)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 15, 2016
1 parent 33a5ee7 commit 8316063
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/plugins/georeferencer/qgsgeoreftransform.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 8316063

Please sign in to comment.