diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-12-06 14:26:56 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-12-06 14:26:56 +0100 |
| commit | 706fac8bc70312f5729e2f3aeeb4f67ecb211b1d (patch) | |
| tree | 8f229d8ecdc05cd15537c20c94181656cdcc7eec /src/coordinateoperation.cpp | |
| parent | 892f2eb80ace522c841afeb435671ca048215b66 (diff) | |
| parent | 25fa18055f43d0881a1a2bf9990c99fecfcbdbb7 (diff) | |
| download | PROJ-706fac8bc70312f5729e2f3aeeb4f67ecb211b1d.tar.gz PROJ-706fac8bc70312f5729e2f3aeeb4f67ecb211b1d.zip | |
Merge remote-tracking branch 'rouault/gdalbarn'
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; |
