From 7ab63b60f656811ee7960a9e7ba07401d61053cd Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 6 Jan 2022 12:26:45 +0100 Subject: Implement Geographic3D to Depth/Geog2D+Depth as used by ETRS89 to CD Norway depth Fixes #2739 Verified with example from IOGP Guidance Note 7-2 (ver 62, Dec 2021) page 169, with 38 = h_obs - D_obs = 50 - 12. $ echo 60.0015 4.9960 38 | PROJ_LIB=data PROJ_NETWORK=ON bin/cs2cs -d 4 EPSG:4937 EPSG:9883 60.0015 4.9960 5.8827 $ echo 60.0015 4.9960 38 | PROJ_LIB=data PROJ_NETWORK=ON bin/cs2cs -d 4 EPSG:4937 EPSG:4258+9672 60.0015 4.9960 5.8827 $ echo 60.0015 4.9960 5.8827 | PROJ_LIB=data PROJ_NETWORK=ON bin/cs2cs -d 4 EPSG:9883 EPSG:4937 60.0015 4.9960 38.0000 $ echo 60.0015 4.9960 5.8827 | PROJ_LIB=data PROJ_NETWORK=ON bin/cs2cs -d 4 EPSG:4258+9672 EPSG:4937 60.0015 4.9960 38.0000 --- src/iso19111/io.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/iso19111/io.cpp') diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index 67877206..6c66b6f8 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -7671,6 +7671,13 @@ const std::string &PROJStringFormatter::toString() const { continue; } + // axisswap order=1,2,-3 is its own inverse + if (step.name == "axisswap" && paramCount == 1 && + step.paramValues[0].equals("order", "1,2,-3")) { + step.inverted = false; + continue; + } + // handle unitconvert inverse if (step.name == "unitconvert" && paramCount == 2 && step.paramValues[0].keyEquals("xy_in") && -- cgit v1.2.3