diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-04-05 22:47:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-05 22:47:48 +0200 |
| commit | 754e1eef9bebcd59680caa90f58dff0710aab093 (patch) | |
| tree | 5be17896aa2506481f8e48a9a8968ee135456cab /src/iso19111/operation/coordinateoperationfactory.cpp | |
| parent | 3ae02ac091440298808e6ea0ba76ae692ded06bb (diff) | |
| parent | 34e93f11392e6966ed5bbaced983dea444157419 (diff) | |
| download | PROJ-754e1eef9bebcd59680caa90f58dff0710aab093.tar.gz PROJ-754e1eef9bebcd59680caa90f58dff0710aab093.zip | |
Merge pull request #2650 from rouault/fix_createBetweenGeodeticCRSWithDatumBasedIntermediates
createOperations(): make createBetweenGeodeticCRSWithDatumBasedIntermediates() reachable...
Diffstat (limited to 'src/iso19111/operation/coordinateoperationfactory.cpp')
| -rw-r--r-- | src/iso19111/operation/coordinateoperationfactory.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/iso19111/operation/coordinateoperationfactory.cpp b/src/iso19111/operation/coordinateoperationfactory.cpp index 8fb6d9b2..eb560cc9 100644 --- a/src/iso19111/operation/coordinateoperationfactory.cpp +++ b/src/iso19111/operation/coordinateoperationfactory.cpp @@ -3282,22 +3282,19 @@ bool CoordinateOperationFactory::Private::createOperationsFromDatabase( res.insert(res.end(), resWithIntermediate.begin(), resWithIntermediate.end()); doFilterAndCheckPerfectOp = !res.empty(); + } - } else if (!context.inCreateOperationsWithDatumPivotAntiRecursion && - !resFindDirectNonEmptyBeforeFiltering && geodSrc && geodDst && - !sameGeodeticDatum && - context.context->getIntermediateCRS().empty() && - context.context->getAllowUseIntermediateCRS() != - CoordinateOperationContext::IntermediateCRSUse::NEVER) { - - bool tryWithGeodeticDatumIntermediate = res.empty(); - if (tryWithGeodeticDatumIntermediate) { - auto resWithIntermediate = findsOpsInRegistryWithIntermediate( - sourceCRS, targetCRS, context, true); - res.insert(res.end(), resWithIntermediate.begin(), - resWithIntermediate.end()); - doFilterAndCheckPerfectOp = !res.empty(); - } + if (res.empty() && !context.inCreateOperationsWithDatumPivotAntiRecursion && + !resFindDirectNonEmptyBeforeFiltering && geodSrc && geodDst && + !sameGeodeticDatum && context.context->getIntermediateCRS().empty() && + context.context->getAllowUseIntermediateCRS() != + CoordinateOperationContext::IntermediateCRSUse::NEVER) { + // Currently triggered by "IG05/12 Intermediate CRS" to ITRF2014 + auto resWithIntermediate = findsOpsInRegistryWithIntermediate( + sourceCRS, targetCRS, context, true); + res.insert(res.end(), resWithIntermediate.begin(), + resWithIntermediate.end()); + doFilterAndCheckPerfectOp = !res.empty(); } if (doFilterAndCheckPerfectOp) { |
