diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-03-19 23:06:13 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-03-19 23:17:59 +0100 |
| commit | 5aa3d9fce2e29f7a20d68708d06c55685efe3d5a (patch) | |
| tree | 88b2a28d807bd5c4942d19d5a98a8a083de48cd8 /src/iso19111/c_api.cpp | |
| parent | 0c5802e0f840cf289dffa02571e414b276bb7d62 (diff) | |
| download | PROJ-5aa3d9fce2e29f7a20d68708d06c55685efe3d5a.tar.gz PROJ-5aa3d9fce2e29f7a20d68708d06c55685efe3d5a.zip | |
proj_get_suggested_operation(): fix when there are only operations without area of use
Diffstat (limited to 'src/iso19111/c_api.cpp')
| -rw-r--r-- | src/iso19111/c_api.cpp | 3 |
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) { |
