diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-05-15 11:57:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-15 11:57:52 +0200 |
| commit | 40bceca79f71d88fbc4953fa6c2bb6b6ed89c473 (patch) | |
| tree | 287942fd320de28ac1fafd9f351b675fd8df89a5 /src/iso19111/crs.cpp | |
| parent | 672b610dbccb37f7f0e1d73745b5a02331a3e090 (diff) | |
| parent | a918082e5875aac849f80b18a8ee1a2cdff8056e (diff) | |
| download | PROJ-40bceca79f71d88fbc4953fa6c2bb6b6ed89c473.tar.gz PROJ-40bceca79f71d88fbc4953fa6c2bb6b6ed89c473.zip | |
Merge pull request #2222 from rouault/fix_2217
Fixes related to CompoundCRS and BoundCRS
Diffstat (limited to 'src/iso19111/crs.cpp')
| -rw-r--r-- | src/iso19111/crs.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/iso19111/crs.cpp b/src/iso19111/crs.cpp index c23bd29b..ec342a8f 100644 --- a/src/iso19111/crs.cpp +++ b/src/iso19111/crs.cpp @@ -4620,18 +4620,9 @@ BoundCRS::create(const CRSNNPtr &baseCRSIn, const CRSNNPtr &hubCRSIn, BoundCRSNNPtr BoundCRS::createFromTOWGS84(const CRSNNPtr &baseCRSIn, const std::vector<double> &TOWGS84Parameters) { - - auto geodCRS = baseCRSIn->extractGeodeticCRS(); - auto targetCRS = - geodCRS.get() == nullptr || - dynamic_cast<const crs::GeographicCRS *>(geodCRS.get()) - ? util::nn_static_pointer_cast<crs::CRS>( - crs::GeographicCRS::EPSG_4326) - : util::nn_static_pointer_cast<crs::CRS>( - crs::GeodeticCRS::EPSG_4978); - return create( - baseCRSIn, targetCRS, - operation::Transformation::createTOWGS84(baseCRSIn, TOWGS84Parameters)); + auto transf = + operation::Transformation::createTOWGS84(baseCRSIn, TOWGS84Parameters); + return create(baseCRSIn, transf->targetCRS(), transf); } // --------------------------------------------------------------------------- |
