aboutsummaryrefslogtreecommitdiff
path: root/test/gie
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-11-29 14:10:15 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-11-29 15:46:23 +0100
commitbc0c9f3e96dc4a9829f1f3d1e1307b4dd5dd10de (patch)
treebc1d30153ddbae531c157afa2609204f9be64152 /test/gie
parent87270ae6f1840872d5f49c70258941197b0ce809 (diff)
downloadPROJ-bc0c9f3e96dc4a9829f1f3d1e1307b4dd5dd10de.tar.gz
PROJ-bc0c9f3e96dc4a9829f1f3d1e1307b4dd5dd10de.zip
Inverse tmerc spherical: fix wrong sign of latitude when lat_0 is used (fixes #2468)
Corrected formula given by @evanmiller
Diffstat (limited to 'test/gie')
-rw-r--r--test/gie/builtins.gie124
1 files changed, 124 insertions, 0 deletions
diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie
index add5d925..0f86bed2 100644
--- a/test/gie/builtins.gie
+++ b/test/gie/builtins.gie
@@ -5782,6 +5782,130 @@ accept -200 -100
expect -0.001790493 -0.000895247
-------------------------------------------------------------------------------
+# Approx tmerc on a almost spherical ellipsoid, lat_0 north hemisphere
+
+operation +proj=tmerc +a=6400000 +rf=1e12 +k=0.9 +lat_0=40 +approx
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+
+accept 0 -30
+expect 0 -7037167.5440
+roundtrip 1
+
+accept 1 -30
+expect 87064.5795 -7037547.4590
+roundtrip 1
+
+accept -1 -30
+expect -87064.5795 -7037547.4590
+roundtrip 1
+
+accept 0 30
+expect 0 -1005309.6491
+roundtrip 1
+
+accept 0 40
+expect 0 0
+roundtrip 1
+
+accept 1 41
+expect 75872.2182 100965.3718
+roundtrip 1
+
+-------------------------------------------------------------------------------
+# Approx tmerc on a sphere, lat_0 north hemisphere
+
+operation +proj=tmerc +R=6400000 +k=0.9 +lat_0=40
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+
+accept 0 -30
+expect 0 -7037167.5440
+roundtrip 1
+
+accept 1 -30
+expect 87064.5795 -7037547.4590
+roundtrip 1
+
+accept -1 -30
+expect -87064.5795 -7037547.4590
+roundtrip 1
+
+accept 0 30
+expect 0 -1005309.6491
+roundtrip 1
+
+accept 0 40
+expect 0 0
+roundtrip 1
+
+accept 1 41
+expect 75872.2182 100965.3718
+roundtrip 1
+
+-------------------------------------------------------------------------------
+# Approx tmerc on a almost spherical ellipsoid, lat_0 south hemisphere
+
+operation +proj=tmerc +a=6400000 +rf=1e12 +k=0.9 +lat_0=-40 +approx
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+
+accept 0 -30
+expect 0 1005309.6491
+roundtrip 1
+
+accept 1 -30
+expect 87064.5795 1004929.7341
+roundtrip 1
+
+accept -1 -30
+expect -87064.5795 1004929.7341
+roundtrip 1
+
+accept 0 30
+expect 0 7037167.5440
+roundtrip 1
+
+accept 0 -40
+expect 0 0
+roundtrip 1
+
+accept 1 -41
+expect 75872.2182 -100965.3718
+roundtrip 1
+
+-------------------------------------------------------------------------------
+# Approx tmerc on a sphere, lat_0 south hemisphere
+
+operation +proj=tmerc +R=6400000 +k=0.9 +lat_0=-40
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+
+accept 0 -30
+expect 0 1005309.6491
+roundtrip 1
+
+accept 1 -30
+expect 87064.5795 1004929.7341
+roundtrip 1
+
+accept -1 -30
+expect -87064.5795 1004929.7341
+roundtrip 1
+
+accept 0 30
+expect 0 7037167.5440
+roundtrip 1
+
+accept 0 -40
+expect 0 0
+roundtrip 1
+
+accept 1 -41
+expect 75872.2182 -100965.3718
+roundtrip 1
+
+-------------------------------------------------------------------------------
operation +proj=tmerc +R=1
-------------------------------------------------------------------------------
direction inverse