diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-10-08 01:09:54 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-10-08 17:31:57 +0200 |
| commit | 4049f4cc961f78d9313525e3eb82fbc5bb3fd879 (patch) | |
| tree | 5c41b86254c3cb9d4791ec46daab244bc107ebc4 | |
| parent | 492c95ce77f4ebdab401c6fcc2d1dae5c6b5c401 (diff) | |
| download | PROJ-4049f4cc961f78d9313525e3eb82fbc5bb3fd879.tar.gz PROJ-4049f4cc961f78d9313525e3eb82fbc5bb3fd879.zip | |
createGeodeticCRS(): more DatumEnsemble compatibility in the case when creating from text_definition
| -rw-r--r-- | src/iso19111/factory.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp index 3895edb2..5f12273d 100644 --- a/src/iso19111/factory.cpp +++ b/src/iso19111/factory.cpp @@ -2366,18 +2366,16 @@ static crs::GeodeticCRSNNPtr cloneWithProps(const crs::GeodeticCRSNNPtr &geodCRS, const util::PropertyMap &props) { auto cs = geodCRS->coordinateSystem(); - auto datum = geodCRS->datum(); - if (!datum) { - return geodCRS; - } auto ellipsoidalCS = util::nn_dynamic_pointer_cast<cs::EllipsoidalCS>(cs); if (ellipsoidalCS) { - return crs::GeographicCRS::create(props, NN_NO_CHECK(datum), + return crs::GeographicCRS::create(props, geodCRS->datum(), + geodCRS->datumEnsemble(), NN_NO_CHECK(ellipsoidalCS)); } auto geocentricCS = util::nn_dynamic_pointer_cast<cs::CartesianCS>(cs); if (geocentricCS) { - return crs::GeodeticCRS::create(props, NN_NO_CHECK(datum), + return crs::GeodeticCRS::create(props, geodCRS->datum(), + geodCRS->datumEnsemble(), NN_NO_CHECK(geocentricCS)); } return geodCRS; |
