From 3bd64e8532521d61119df0a6a365a0a32b5c9b15 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 15 Sep 2021 05:42:17 +0200 Subject: Fix error in implementation of Inverse ellipsoidal orthographic projection (oblique case) that cause convergence to sometimes fail (fixes #2844) --- test/gie/builtins.gie | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 9e1d3339..9cebec84 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -4531,6 +4531,16 @@ tolerance 0.1 mm accept 0 -6343600 expect 0 -59.966377950099655436 +------------------------------------------------------------------------------- +# Oblique +# Test case from https://github.com/OSGeo/PROJ/issues/2844 +------------------------------------------------------------------------------- +operation +proj=ortho +ellps=WGS84 +lon_0=23.0 +lat_0=37.0 +tolerance 0.1 mm +accept 120.0 84.0 +expect 663929.0678 5118338.2423 +roundtrip 1 + ------------------------------------------------------------------------------- # Equatorial -- cgit v1.2.3 From d209e4ab62e9ab6f1c3825acd518bec421aebf12 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 15 Sep 2021 06:41:23 +0200 Subject: Inverse ellipsoidal orthographic projection (oblique case): fix convergence at pole --- test/gie/builtins.gie | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) (limited to 'test') diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 9cebec84..569ca812 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -4531,6 +4531,68 @@ tolerance 0.1 mm accept 0 -6343600 expect 0 -59.966377950099655436 +# At pole or very close to it +direction forward +tolerance 0.1 mm +accept 0 90 +expect 0 5523613.1150 + +direction inverse +tolerance 0.1 mm +accept 0 5523613.1150 +expect 0 90 + +direction forward +tolerance 0.1 mm +accept 0 89.99999999 +expect 0 5523613.1145 +roundtrip 1 + +direction forward +tolerance 0.1 mm +accept 180 89.99999999 +expect 0 5523613.1156 +roundtrip 1 + +direction forward +tolerance 0.1 mm +accept 90 89.99999999 +expect 0.0011 5523613.1150 +# Roundrip doesn't work on 32bit builds +#roundtrip 1 + +direction forward +tolerance 0.1 mm +accept -90 89.99999999 +expect -0.0011 5523613.1150 +roundtrip 1 + +# Southern hemisphere +operation +proj=ortho +ellps=WGS84 +lat_0=-30 + +# At pole or very close to it +direction forward +tolerance 0.1 mm +accept 0 -90 +expect 0 -5523613.1150 + +direction inverse +tolerance 0.1 mm +accept 0 -5523613.1150 +expect 0 -90 + +direction forward +tolerance 0.1 mm +accept 0 -89.99999999 +expect 0 -5523613.1145 +roundtrip 1 + +direction forward +tolerance 0.1 mm +accept 180 -89.99999999 +expect 0 -5523613.1156 +roundtrip 1 + ------------------------------------------------------------------------------- # Oblique # Test case from https://github.com/OSGeo/PROJ/issues/2844 -- cgit v1.2.3