Skip to content

Commit f4a63f4

Browse files
authored
Merge pull request OSGeo#3730 from rouault/only_best_error_set
proj_trans(): set PROJ_ERR_COORD_TRANSFM_NO_OPERATION error when failing in ONLY_BEST=YES mode
2 parents 90a9f3f + c19cc08 commit f4a63f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/4D_api.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,10 @@ PJ_COORD proj_trans(PJ *P, PJ_DIRECTION direction, PJ_COORD coord) {
483483
} else if (P->errorIfBestTransformationNotAvailable ||
484484
P->warnIfBestTransformationNotAvailable) {
485485
warnAboutMissingGrid(alt.pj);
486-
if (P->errorIfBestTransformationNotAvailable)
486+
if (P->errorIfBestTransformationNotAvailable) {
487+
proj_errno_set(P, PROJ_ERR_COORD_TRANSFM_NO_OPERATION);
487488
return res;
489+
}
488490
P->warnIfBestTransformationNotAvailable = false;
489491
skipNonInstantiable = true;
490492
}

0 commit comments

Comments
 (0)