From 5aa3d9fce2e29f7a20d68708d06c55685efe3d5a Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 19 Mar 2020 23:06:13 +0100 Subject: proj_get_suggested_operation(): fix when there are only operations without area of use --- src/iso19111/c_api.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/iso19111/c_api.cpp b/src/iso19111/c_api.cpp index d7fb35f3..ec6f1dc4 100644 --- a/src/iso19111/c_api.cpp +++ b/src/iso19111/c_api.cpp @@ -7664,6 +7664,9 @@ int proj_get_suggested_operation(PJ_CONTEXT *ctx, PJ_OBJ_LIST *operations, int iExcluded[2] = {-1, -1}; const auto &preparedOps = opList->getPreparedOperations(ctx); + if (preparedOps.empty() && !opList->objects.empty()) { + return 0; + } int idx = pj_get_suggested_operation(ctx, preparedOps, iExcluded, direction, coord); if (idx >= 0) { -- cgit v1.2.3