Skip to content

Commit

Permalink
Reset proj error before attempting transforms, avoids older errors
Browse files Browse the repository at this point in the history
contaminating result of transform
  • Loading branch information
nyalldawson committed May 21, 2019
1 parent 5cd8cb6 commit 9222f23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/qgscoordinatetransform.cpp
Expand Up @@ -636,6 +636,7 @@ void QgsCoordinateTransform::transformCoords( int numPoints, double *x, double *
#if PROJ_VERSION_MAJOR>=6
const bool sourceAxisOrderSwapped = direction == ForwardTransform ? d->mSourceAxisOrderSwapped : d->mDestAxisOrderSwapped;

proj_errno_reset( projData );
proj_trans_generic( projData, direction == ForwardTransform ? PJ_FWD : PJ_INV,
!sourceAxisOrderSwapped ? x : y, sizeof( double ), numPoints,
!sourceAxisOrderSwapped ? y : x, sizeof( double ), numPoints,
Expand Down

0 comments on commit 9222f23

Please sign in to comment.