From 8869f7036efb879620a7e42f9c159a5bb07511cb Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 4 Dec 2018 16:51:55 +0100 Subject: export to WKT1 of geocentric CRS: do not emit a TOWGS84 node if the datum is WGS84 --- src/crs.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/crs.cpp') diff --git a/src/crs.cpp b/src/crs.cpp index d4d98fa4..9f1f53c7 100644 --- a/src/crs.cpp +++ b/src/crs.cpp @@ -372,6 +372,11 @@ CRSNNPtr CRS::createBoundCRSToWGS84IfPossible( auto geogCRS = extractGeographicCRS(); auto hubCRS = util::nn_static_pointer_cast(GeographicCRS::EPSG_4326); if (geodCRS && !geogCRS) { + if (geodCRS->_isEquivalentTo( + GeographicCRS::EPSG_4978.get(), + util::IComparable::Criterion::EQUIVALENT)) { + return thisAsCRS; + } hubCRS = util::nn_static_pointer_cast(GeodeticCRS::EPSG_4978); } else if (!geogCRS || geogCRS->_isEquivalentTo( -- cgit v1.2.3