diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2022-03-09 14:25:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-09 14:25:35 +0100 |
| commit | 7779e87663753bb4a12e78784e6246b4ec696f5a (patch) | |
| tree | 59fe96568cc0333d90e5e6f0044a1e6f4bf0cae2 /src | |
| parent | 2f782f927c6a81d6e41d23209fe9170a21fdd950 (diff) | |
| parent | ec4b1747f706d58e47290f2b80a7127a9f65f1b5 (diff) | |
| download | PROJ-7779e87663753bb4a12e78784e6246b4ec696f5a.tar.gz PROJ-7779e87663753bb4a12e78784e6246b4ec696f5a.zip | |
Merge pull request #3101 from OSGeo/backport-3098-to-9.0
[Backport 9.0] 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 { |
