Skip to content

Commit

Permalink
Merge pull request #3730 from rouault/only_best_error_set
Browse files Browse the repository at this point in the history
proj_trans(): set PROJ_ERR_COORD_TRANSFM_NO_OPERATION error when failing in ONLY_BEST=YES mode
  • Loading branch information
rouault authored May 16, 2023
2 parents 90a9f3f + c19cc08 commit f4a63f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/4D_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,10 @@ PJ_COORD proj_trans(PJ *P, PJ_DIRECTION direction, PJ_COORD coord) {
} else if (P->errorIfBestTransformationNotAvailable ||
P->warnIfBestTransformationNotAvailable) {
warnAboutMissingGrid(alt.pj);
if (P->errorIfBestTransformationNotAvailable)
if (P->errorIfBestTransformationNotAvailable) {
proj_errno_set(P, PROJ_ERR_COORD_TRANSFM_NO_OPERATION);
return res;
}
P->warnIfBestTransformationNotAvailable = false;
skipNonInstantiable = true;
}
Expand Down

0 comments on commit f4a63f4

Please sign in to comment.