aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-04-11 00:03:03 +0200
committerKristian Evers <kristianevers@gmail.com>2018-04-12 20:03:01 +0200
commit6985b96c56575040e63602725be61364824b752e (patch)
tree05aa4f38f083392d3970c40c4f0476c261c1afd9
parent39477bef8714e1f489ab187a34f08d211e15cba3 (diff)
downloadPROJ-6985b96c56575040e63602725be61364824b752e.tar.gz
PROJ-6985b96c56575040e63602725be61364824b752e.zip
Add more tests for laea
-rw-r--r--test/gie/builtins.gie151
1 files changed, 149 insertions, 2 deletions
diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie
index 84d5c832..4f6d6a44 100644
--- a/test/gie/builtins.gie
+++ b/test/gie/builtins.gie
@@ -2211,7 +2211,7 @@ Lambert Azimuthal Equal Area
===============================================================================
-------------------------------------------------------------------------------
-operation +proj=laea +ellps=GRS80 +lat_1=0.5 +lat_2=2
+operation +proj=laea +ellps=GRS80
-------------------------------------------------------------------------------
tolerance 0.1 mm
accept 2 1
@@ -2223,6 +2223,9 @@ expect -222602.471450095 110589.827224410
accept -2 -1
expect -222602.471450095 -110589.827224409
+accept 180 0
+expect failure errno tolerance_condition
+
direction inverse
accept 200 100
expect 0.001796631 0.000904369
@@ -2234,7 +2237,7 @@ accept -200 -100
expect -0.001796631 -0.000904369
-------------------------------------------------------------------------------
-operation +proj=laea +R=6400000 +lat_1=0.5 +lat_2=2
+operation +proj=laea +R=6400000
-------------------------------------------------------------------------------
tolerance 0.1 mm
accept 2 1
@@ -2246,6 +2249,9 @@ expect -223365.281370125 111716.668072916
accept -2 -1
expect -223365.281370125 -111716.668072916
+accept 180 0
+expect failure errno tolerance_condition
+
direction inverse
accept 200 100
expect 0.001790493 0.000895247
@@ -2256,6 +2262,147 @@ expect -0.001790493 0.000895247
accept -200 -100
expect -0.001790493 -0.000895247
+-------------------------------------------------------------------------------
+Test oblique aspect of the spherical form
+-------------------------------------------------------------------------------
+operation +proj=laea +R=1 +lat_0=45
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept 0 45
+expect 0 0
+accept 0 0
+expect 0 -0.7654
+accept 0 90
+expect 0 0.7654
+accept 0 -45
+expect 0 -1.4142
+accept 45 45
+expect 0.5194 0.1521
+
+tolerance 0.1 mm
+accept 45 45
+roundtrip 100
+
+# error when waaay outside the sphere
+direction inverse
+accept 0 10
+expect failure errno tolerance_condition
+
+-------------------------------------------------------------------------------
+Test oblique aspect of the ellipsoidal form
+-------------------------------------------------------------------------------
+operation +proj=laea +ellps=GRS80 +lat_0=45
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept 0 45
+expect 0 0
+accept 0 0
+expect 0 -4860248.8602
+accept 0 90
+expect 0 4886594.2207
+accept 0 -45
+expect 0 -8984728.0442
+accept 45 45
+expect 3318800.8682 968788.2336
+
+tolerance 10 cm
+accept 45 45
+roundtrip 100
+
+# test rho <EPS10
+direction inverse
+accept 0 0
+expect 0 45
+
+-------------------------------------------------------------------------------
+Test south polar aspect for the spherical form
+-------------------------------------------------------------------------------
+operation +proj=laea +R=1 +lat_0=-90
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept 0 -90
+expect 0 0
+accept 0 0
+expect 0 1.4142
+accept 0 -45
+expect 0 0.7654
+accept 0 45
+expect 0 1.8478
+accept 0 90
+expect failure errno tolerance_condition
+
+tolerance 0.1 mm
+accept 45 45
+roundtrip 100
+
+-------------------------------------------------------------------------------
+Test south polar aspect for the ellipsoidal form
+-------------------------------------------------------------------------------
+operation +proj=laea +ellps=GRS80 +lat_0=-90
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept 0 -90
+expect 0 0
+accept 0 0
+expect 0 9009964.7611
+accept 0 -45
+expect 0 4889334.8030
+accept 0 45
+expect 0 11766619.5307
+accept 0 90
+expect failure errno tolerance_condition
+
+tolerance 10 cm
+accept 45 45
+roundtrip 100
+
+# test q == 0.0 condition
+direction inverse
+accept 0 0
+expect 0 -90
+
+-------------------------------------------------------------------------------
+Test north polar aspect for the spherical form
+-------------------------------------------------------------------------------
+operation +proj=laea +R=1 +lat_0=90
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept 0 90
+expect 0 0
+accept 0 0
+expect 0 -1.4142
+accept 0 45
+expect 0 -0.7654
+accept 0 -45
+expect 0 -1.8478
+accept 0 -90
+expect failure errno tolerance_condition
+
+tolerance 0.1 mm
+accept 45 45
+roundtrip 100
+
+-------------------------------------------------------------------------------
+Test north polar aspect
+-------------------------------------------------------------------------------
+operation +proj=laea +ellps=GRS80 +lat_0=90
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept 0 90
+expect 0 0
+accept 0 0
+expect 0 -9009964.7611
+accept 0 45
+expect 0 -4889334.8030
+accept 0 -45
+expect 0 -11766619.5307
+accept 0 -90
+expect failure errno tolerance_condition
+
+tolerance 10 cm
+accept 45 45
+roundtrip 100
+
===============================================================================
Lagrange