diff options
Diffstat (limited to 'src/coordinateoperation.cpp')
| -rw-r--r-- | src/coordinateoperation.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/coordinateoperation.cpp b/src/coordinateoperation.cpp index a58cfdbe..04f9bc9a 100644 --- a/src/coordinateoperation.cpp +++ b/src/coordinateoperation.cpp @@ -8683,6 +8683,7 @@ struct CoordinateOperationContext::Private { bool allowUseIntermediateCRS_ = true; std::vector<std::pair<std::string, std::string>> intermediateCRSAuthCodes_{}; + bool discardSuperseded_ = true; }; //! @endcond @@ -8823,6 +8824,29 @@ bool CoordinateOperationContext::getUsePROJAlternativeGridNames() const { // --------------------------------------------------------------------------- +/** \brief Return whether transformations that are superseded (but not + * deprecated) + * should be discarded. + * + * The default is true. + */ +bool CoordinateOperationContext::getDiscardSuperseded() const { + return d->discardSuperseded_; +} + +// --------------------------------------------------------------------------- + +/** \brief Set whether transformations that are superseded (but not deprecated) + * should be discarded. + * + * The default is true. + */ +void CoordinateOperationContext::setDiscardSuperseded(bool discard) { + d->discardSuperseded_ = discard; +} + +// --------------------------------------------------------------------------- + /** \brief Set how grid availability is used. * * The default is USE_FOR_SORTING. @@ -9654,7 +9678,8 @@ findOpsInRegistryDirect(const crs::CRSNNPtr &sourceCRS, context->getGridAvailabilityUse() == CoordinateOperationContext:: GridAvailabilityUse:: - DISCARD_OPERATION_IF_MISSING_GRID); + DISCARD_OPERATION_IF_MISSING_GRID, + context->getDiscardSuperseded()); if (!res.empty()) { return res; } @@ -9695,6 +9720,7 @@ static std::vector<CoordinateOperationNNPtr> findsOpsInRegistryWithIntermediate( context->getGridAvailabilityUse() == CoordinateOperationContext::GridAvailabilityUse:: DISCARD_OPERATION_IF_MISSING_GRID, + context->getDiscardSuperseded(), context->getIntermediateCRS()); if (!res.empty()) { return res; |
