aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-11-11 19:07:26 +0100
committerEven Rouault <even.rouault@spatialys.com>2021-11-11 22:29:10 +0100
commit86a197a7d6ef953810ad5c7e0c675e3cefc16dbe (patch)
tree825fcf65719840a5f4a5a651e4421987ca03c813 /src
parentf7e9db583b709b62aabeaf8ae7f8b1f7e1505395 (diff)
downloadPROJ-86a197a7d6ef953810ad5c7e0c675e3cefc16dbe.tar.gz
PROJ-86a197a7d6ef953810ad5c7e0c675e3cefc16dbe.zip
createOperations(): do not stop at the first operation in the PROJ namespace for vertical transformations
In particular helps with transformation between "NAD83 + NAVD88 height" and WGS 84 that have regressed in 8.2.0 Fixes #2936
Diffstat (limited to 'src')
-rw-r--r--src/iso19111/operation/coordinateoperationfactory.cpp37
1 files changed, 25 insertions, 12 deletions
diff --git a/src/iso19111/operation/coordinateoperationfactory.cpp b/src/iso19111/operation/coordinateoperationfactory.cpp
index e9bd3cfe..971e265a 100644
--- a/src/iso19111/operation/coordinateoperationfactory.cpp
+++ b/src/iso19111/operation/coordinateoperationfactory.cpp
@@ -1624,6 +1624,9 @@ CoordinateOperationFactory::Private::findOpsInRegistryDirect(
context.extent1, context.extent2);
res.insert(res.end(), resTmp.begin(), resTmp.end());
if (authName == "PROJ") {
+ // Do not stop at the first transformations available in
+ // the PROJ namespace, but allow the next authority to
+ // continue
continue;
}
if (!res.empty()) {
@@ -1669,24 +1672,34 @@ CoordinateOperationFactory::Private::findOpsInRegistryDirectTo(
const auto authorities(getCandidateAuthorities(
authFactory, targetAuthName, targetAuthName));
+ std::vector<CoordinateOperationNNPtr> res;
for (const auto &authority : authorities) {
+ const auto authName =
+ authority == "any" ? std::string() : authority;
const auto tmpAuthFactory = io::AuthorityFactory::create(
- authFactory->databaseContext(),
- authority == "any" ? std::string() : authority);
- auto res = tmpAuthFactory->createFromCoordinateReferenceSystemCodes(
- std::string(), std::string(), targetAuthName, targetCode,
- context.context->getUsePROJAlternativeGridNames(),
+ authFactory->databaseContext(), authName);
+ auto resTmp =
+ tmpAuthFactory->createFromCoordinateReferenceSystemCodes(
+ std::string(), std::string(), targetAuthName, targetCode,
+ context.context->getUsePROJAlternativeGridNames(),
- gridAvailabilityUse ==
- CoordinateOperationContext::GridAvailabilityUse::
- DISCARD_OPERATION_IF_MISSING_GRID ||
+ gridAvailabilityUse ==
+ CoordinateOperationContext::GridAvailabilityUse::
+ DISCARD_OPERATION_IF_MISSING_GRID ||
+ gridAvailabilityUse ==
+ CoordinateOperationContext::GridAvailabilityUse::
+ KNOWN_AVAILABLE,
gridAvailabilityUse ==
CoordinateOperationContext::GridAvailabilityUse::
KNOWN_AVAILABLE,
- gridAvailabilityUse == CoordinateOperationContext::
- GridAvailabilityUse::KNOWN_AVAILABLE,
- context.context->getDiscardSuperseded(), true, true,
- context.extent1, context.extent2);
+ context.context->getDiscardSuperseded(), true, true,
+ context.extent1, context.extent2);
+ res.insert(res.end(), resTmp.begin(), resTmp.end());
+ if (authName == "PROJ") {
+ // Do not stop at the first transformations available in
+ // the PROJ namespace, but allow the next authority to continue
+ continue;
+ }
if (!res.empty()) {
auto resFiltered =
FilterResults(res, context.context, context.extent1,