diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2022-03-09 11:35:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-09 11:35:35 +0100 |
| commit | a95b6736a3e08fea6d578e28e600fed297763d8c (patch) | |
| tree | d504206892210af900fdf497a08ed2f300d27395 /src | |
| parent | 2fae94ba7be41d3a829db3da55d54ec20ce526da (diff) | |
| parent | 26a7f7751579a3c0a2bbce59b9f39544d95f6720 (diff) | |
| download | PROJ-a95b6736a3e08fea6d578e28e600fed297763d8c.tar.gz PROJ-a95b6736a3e08fea6d578e28e600fed297763d8c.zip | |
Merge pull request #3098 from rouault/fix_gdal_5408
Fix issue when transforming from/to BoundCRS of 3D CRS with non-Green…
Diffstat (limited to 'src')
| -rw-r--r-- | src/iso19111/io.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index b7f26fe5..d4c6aec1 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -4341,10 +4341,10 @@ createBoundCRSSourceTransformationCRS(const crs::CRSPtr &sourceCRS, sourceCRS->extractGeographicCRS(); sourceTransformationCRS = sourceGeographicCRS; if (sourceGeographicCRS) { - if (sourceGeographicCRS->datum() != nullptr && - sourceGeographicCRS->primeMeridian() - ->longitude() - .getSIValue() != 0.0) { + const auto &sourceDatum = sourceGeographicCRS->datum(); + if (sourceDatum != nullptr && sourceGeographicCRS->primeMeridian() + ->longitude() + .getSIValue() != 0.0) { sourceTransformationCRS = GeographicCRS::create( util::PropertyMap().set( @@ -4354,13 +4354,12 @@ createBoundCRSSourceTransformationCRS(const crs::CRSPtr &sourceCRS, datum::GeodeticReferenceFrame::create( util::PropertyMap().set( common::IdentifiedObject::NAME_KEY, - sourceGeographicCRS->datum()->nameStr() + + sourceDatum->nameStr() + " (with Greenwich prime meridian)"), - sourceGeographicCRS->datum()->ellipsoid(), + sourceDatum->ellipsoid(), util::optional<std::string>(), datum::PrimeMeridian::GREENWICH), - cs::EllipsoidalCS::createLatitudeLongitude( - common::UnitOfMeasure::DEGREE)) + sourceGeographicCRS->coordinateSystem()) .as_nullable(); } } else { |
