From 3126383bebf1f2a16bffda30680c79333d5bb9cc Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 20 Jul 2021 11:16:10 +0200 Subject: Merge pull request #2782 from rouault/fix_crs_extent_use_none createOperations(): fix SourceTargetCRSExtentUse::NONE mode --- src/iso19111/operation/coordinateoperationfactory.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/iso19111/operation/coordinateoperationfactory.cpp b/src/iso19111/operation/coordinateoperationfactory.cpp index e04cdb8d..d63db19e 100644 --- a/src/iso19111/operation/coordinateoperationfactory.cpp +++ b/src/iso19111/operation/coordinateoperationfactory.cpp @@ -5346,6 +5346,12 @@ CoordinateOperationFactory::createOperations( metadata::ExtentPtr targetCRSExtent; auto l_resolvedTargetCRS = crs::CRS::getResolvedCRS(l_targetCRS, authFactory, targetCRSExtent); + if (context->getSourceAndTargetCRSExtentUse() == + CoordinateOperationContext::SourceTargetCRSExtentUse::NONE) { + // Make sure *not* to use CRS extent if requested to ignore it + sourceCRSExtent.reset(); + targetCRSExtent.reset(); + } Private::Context contextPrivate(sourceCRSExtent, targetCRSExtent, context); if (context->getSourceAndTargetCRSExtentUse() == -- cgit v1.2.3