diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-04-16 19:26:16 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-04-16 21:03:19 +0200 |
| commit | d9e2a15f2e17b6710ccffa3e271595e006ceadf2 (patch) | |
| tree | dd69a0bb125a8b4759bd8d1a0d38d1ae56b568bf /include/proj/internal | |
| parent | c16c23addf48fcb3c87e18bcfd4ebcf0d873a30d (diff) | |
| download | PROJ-d9e2a15f2e17b6710ccffa3e271595e006ceadf2.tar.gz PROJ-d9e2a15f2e17b6710ccffa3e271595e006ceadf2.zip | |
createOperations(): do not attempt using a unrelated datum intermediate when doing geog2D<-->geog3D conversions of same datum
Seen when testing transformations between "CR 05" (EPSG:5365) and "CR-SIRGAS" (EPSG:8907)
which require going through their corresponding 3D GeogCRS to find a Helmert
transformation.
Diffstat (limited to 'include/proj/internal')
| -rw-r--r-- | include/proj/internal/coordinateoperation_internal.hpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/proj/internal/coordinateoperation_internal.hpp b/include/proj/internal/coordinateoperation_internal.hpp index 680e805e..207c20b4 100644 --- a/include/proj/internal/coordinateoperation_internal.hpp +++ b/include/proj/internal/coordinateoperation_internal.hpp @@ -109,8 +109,9 @@ using InverseCoordinateOperationNNPtr = util::nn<InverseCoordinateOperationPtr>; */ class InverseCoordinateOperation : virtual public CoordinateOperation { public: - InverseCoordinateOperation(const CoordinateOperationNNPtr &forwardOperation, - bool wktSupportsInversion); + InverseCoordinateOperation( + const CoordinateOperationNNPtr &forwardOperationIn, + bool wktSupportsInversion); ~InverseCoordinateOperation() override; @@ -124,6 +125,10 @@ class InverseCoordinateOperation : virtual public CoordinateOperation { CoordinateOperationNNPtr inverse() const override; + const CoordinateOperationNNPtr &forwardOperation() const { + return forwardOperation_; + } + protected: CoordinateOperationNNPtr forwardOperation_; bool wktSupportsInversion_; @@ -174,6 +179,8 @@ class InverseConversion : public Conversion, public InverseCoordinateOperation { #endif static CoordinateOperationNNPtr create(const ConversionNNPtr &forward); + + CoordinateOperationNNPtr _shallowClone() const override; }; // --------------------------------------------------------------------------- @@ -204,6 +211,8 @@ class InverseTransformation : public Transformation, return InverseCoordinateOperation::inverse(); } + TransformationNNPtr inverseAsTransformation() const; + #ifdef _MSC_VER // To avoid a warning C4250: // 'osgeo::proj::operation::InverseTransformation': inherits @@ -216,6 +225,8 @@ class InverseTransformation : public Transformation, #endif static TransformationNNPtr create(const TransformationNNPtr &forward); + + CoordinateOperationNNPtr _shallowClone() const override; }; // --------------------------------------------------------------------------- @@ -253,11 +264,14 @@ class PROJBasedOperation : public SingleOperation { gridsNeeded(const io::DatabaseContextPtr &databaseContext) const override; protected: + PROJBasedOperation(const PROJBasedOperation &) = default; explicit PROJBasedOperation(const OperationMethodNNPtr &methodIn); void _exportToPROJString(io::PROJStringFormatter *formatter) const override; // throw(FormattingException) + CoordinateOperationNNPtr _shallowClone() const override; + INLINED_MAKE_SHARED private: |
