aboutsummaryrefslogtreecommitdiff
path: root/test/gie
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-12-02 14:42:33 +0100
committerGitHub <noreply@github.com>2020-12-02 14:42:33 +0100
commitb7fb045ebde07ca461b08269697b25128ed503a1 (patch)
treee0ca10fc65208fec18ca1311f896809a5ca12428 /test/gie
parentf9655458a951b3a0704b5465ea0b1af3c7b8ba09 (diff)
parentd8fe9964bcbc6d1eeaddf6f5d47ca6d444dc8744 (diff)
downloadPROJ-b7fb045ebde07ca461b08269697b25128ed503a1.tar.gz
PROJ-b7fb045ebde07ca461b08269697b25128ed503a1.zip
Merge pull request #2444 from rouault/topocentric
Add +proj=topocentric geocentric->topocentric conversion (fixes #500)
Diffstat (limited to 'test/gie')
-rw-r--r--test/gie/builtins.gie42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie
index e870f1d4..813b67bb 100644
--- a/test/gie/builtins.gie
+++ b/test/gie/builtins.gie
@@ -6873,4 +6873,46 @@ accept -74.25 4.8
expect 80859.033 122543.174
roundtrip 1
+===============================================================================
+# Geocentric/topocentric conversion
+===============================================================================
+
+# Test parameter and point from IOGP Publication 373-7-2 - Geomatics Guidance Note number 7, part 2 - October 2020
+operation +proj=topocentric +ellps=WGS84 +X_0=3652755.3058 +Y_0=319574.6799 +Z_0=5201547.3536
+tolerance 1 mm
+accept 3771793.968 140253.342 5124304.349
+expect -189013.869 -128642.040 -4220.171
+roundtrip 1
+
+===============================================================================
+# Geographic/topocentric conversion
+===============================================================================
+
+# Test parameter and point from IOGP Publication 373-7-2 - Geomatics Guidance Note number 7, part 2 - October 2020
+operation +proj=pipeline +step +proj=cart +ellps=WGS84 +step +proj=topocentric +ellps=WGS84 +lon_0=5 +lat_0=55 +h_0=200
+tolerance 1 mm
+accept 2.12955 53.80939444444444 73
+expect -189013.869 -128642.040 -4220.171
+roundtrip 1
+
+===============================================================================
+# Error cases of topocentric
+===============================================================================
+
+# missing X_0,Y_0,Z_0 or lon_0,lat_0
+operation +proj=topocentric +ellps=WGS84
+expect failure errno missing_args
+
+# missing Z_0
+operation +proj=topocentric +ellps=WGS84 +X_0=0 +Y_0=0
+expect failure errno missing_args
+
+# missing lat_0
+operation +proj=topocentric +ellps=WGS84 +lon_0=0
+expect failure errno missing_args
+
+# X_0 and lon_0 are mutually exclusive
+operation +proj=topocentric +ellps=WGS84 +X_0=0 +lon_0=0
+expect failure errno mutually_exclusive_args
+
</gie-strict>