aboutsummaryrefslogtreecommitdiff
path: root/src/crs.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-12-06 22:51:27 +0100
committerEven Rouault <even.rouault@spatialys.com>2018-12-06 23:42:16 +0100
commitcae698abe380b3823c3f08151c25097031ae091f (patch)
tree0a6702b21eb70e2915b6f7df8514cbec93de0e05 /src/crs.cpp
parent67ca5c199dfe62fc0738a808f3142af2e77eafd7 (diff)
downloadPROJ-cae698abe380b3823c3f08151c25097031ae091f.tar.gz
PROJ-cae698abe380b3823c3f08151c25097031ae091f.zip
Speed-up createBoundCRSToWGS84IfPossible()
Diffstat (limited to 'src/crs.cpp')
-rw-r--r--src/crs.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/crs.cpp b/src/crs.cpp
index 81e9a300..639fc3a9 100644
--- a/src/crs.cpp
+++ b/src/crs.cpp
@@ -375,8 +375,9 @@ VerticalCRSPtr CRS::extractVerticalCRS() const {
*
* @return a CRS.
*/
-CRSNNPtr CRS::createBoundCRSToWGS84IfPossible(
- const io::DatabaseContextPtr &dbContext) const {
+CRSNNPtr
+CRS::createBoundCRSToWGS84IfPossible(const io::DatabaseContextPtr &dbContext,
+ bool allowIntermediateCRS) const {
auto thisAsCRS = NN_NO_CHECK(
std::static_pointer_cast<CRS>(shared_from_this().as_nullable()));
auto boundCRS = util::nn_dynamic_pointer_cast<BoundCRS>(thisAsCRS);
@@ -441,6 +442,7 @@ CRSNNPtr CRS::createBoundCRSToWGS84IfPossible(
authority == "any" ? std::string() : authority);
auto ctxt = operation::CoordinateOperationContext::create(
authFactory, extent, 0.0);
+ ctxt->setAllowUseIntermediateCRS(allowIntermediateCRS);
// ctxt->setSpatialCriterion(
// operation::CoordinateOperationContext::SpatialCriterion::PARTIAL_INTERSECTION);
auto list =