aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-11-28 14:01:18 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-11-28 14:01:18 +0100
commit8a5740637760f837c9145c72ad8080927a3a4bf0 (patch)
treef76545189aa7f453502789f25f1f0bc14b060f09 /src
parent2a5a2ea57ea85c0b0a40ec628214cfd71939b186 (diff)
downloadPROJ-8a5740637760f837c9145c72ad8080927a3a4bf0.tar.gz
PROJ-8a5740637760f837c9145c72ad8080927a3a4bf0.zip
createOperations(): if direct transformation is found in the database but not instantiable, allow using through intermediates. Should help in theory for Auckland 46 -> NZVD2016 the case but there are other issues
Diffstat (limited to 'src')
-rw-r--r--src/iso19111/coordinateoperation.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/iso19111/coordinateoperation.cpp b/src/iso19111/coordinateoperation.cpp
index 575b0350..392810b1 100644
--- a/src/iso19111/coordinateoperation.cpp
+++ b/src/iso19111/coordinateoperation.cpp
@@ -12947,10 +12947,25 @@ bool CoordinateOperationFactory::Private::createOperationsFromDatabase(
}
}
+ bool foundInstantiableOp = false;
+ if (!res.empty()) {
+ for (const auto &op : res) {
+ if (op->isPROJInstantiable(context.context->getAuthorityFactory()
+ ->databaseContext())) {
+ foundInstantiableOp = true;
+ break;
+ }
+ }
+ if (!foundInstantiableOp) {
+ resFindDirectNonEmptyBeforeFiltering = false;
+ }
+ }
+
// NAD27 to NAD83 has tens of results already. No need to look
// for a pivot
if (!sameGeodeticDatum &&
- ((res.empty() && !resFindDirectNonEmptyBeforeFiltering &&
+ (((res.empty() || !foundInstantiableOp) &&
+ !resFindDirectNonEmptyBeforeFiltering &&
context.context->getAllowUseIntermediateCRS() ==
CoordinateOperationContext::IntermediateCRSUse::
IF_NO_DIRECT_TRANSFORMATION) ||
@@ -14389,6 +14404,7 @@ void CoordinateOperationFactory::Private::createOperationsCompoundToCompound(
opDst, interpolationGeogCRS, true);
res.emplace_back(op);
} catch (const InvalidOperationEmptyIntersection &) {
+ } catch (const io::FormattingException &) {
}
}
}