From c19cc0838ecef736ce261b79a240723029b10517 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 13 May 2023 18:03:53 +0200 Subject: [PATCH] proj_trans(): set PROJ_ERR_COORD_TRANSFM_NO_OPERATION error when failing in ONLY_BEST=YES mode --- src/4D_api.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/4D_api.cpp b/src/4D_api.cpp index 860afde8aa..cd8eb2a1df 100644 --- a/src/4D_api.cpp +++ b/src/4D_api.cpp @@ -443,8 +443,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; }