aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-03-19 23:06:13 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-03-19 23:17:59 +0100
commit5aa3d9fce2e29f7a20d68708d06c55685efe3d5a (patch)
tree88b2a28d807bd5c4942d19d5a98a8a083de48cd8 /src
parent0c5802e0f840cf289dffa02571e414b276bb7d62 (diff)
downloadPROJ-5aa3d9fce2e29f7a20d68708d06c55685efe3d5a.tar.gz
PROJ-5aa3d9fce2e29f7a20d68708d06c55685efe3d5a.zip
proj_get_suggested_operation(): fix when there are only operations without area of use
Diffstat (limited to 'src')
-rw-r--r--src/iso19111/c_api.cpp3
1 files changed, 3 insertions, 0 deletions
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) {