diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2022-01-06 12:26:45 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2022-01-06 12:26:45 +0100 |
| commit | 7ab63b60f656811ee7960a9e7ba07401d61053cd (patch) | |
| tree | 536f3fbd6ffe3e61951de8026fb3fd23c313dd80 /src/iso19111/io.cpp | |
| parent | 1254a211beac3f479d193794508a3fcea4f8790f (diff) | |
| download | PROJ-7ab63b60f656811ee7960a9e7ba07401d61053cd.tar.gz PROJ-7ab63b60f656811ee7960a9e7ba07401d61053cd.zip | |
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
Diffstat (limited to 'src/iso19111/io.cpp')
| -rw-r--r-- | src/iso19111/io.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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") && |
