aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-03-15 23:17:03 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-03-16 10:10:02 +0100
commit1c4988d6be1cce93c866df98786d2eca3a244816 (patch)
tree8dbb2289dd90d691dfb228809b46a43691b9f0b7 /test
parented2b26a09b407f7b580297d8a2cc516f786cbcc6 (diff)
downloadPROJ-1c4988d6be1cce93c866df98786d2eca3a244816.tar.gz
PROJ-1c4988d6be1cce93c866df98786d2eca3a244816.zip
sterea: fix lat_0 = -90
A division by zero caused NaN values to be returned. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12062 Credit to OSS Fuzz
Diffstat (limited to 'test')
-rw-r--r--test/gie/builtins.gie56
1 files changed, 54 insertions, 2 deletions
diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie
index 0c1a70b4..32aad873 100644
--- a/test/gie/builtins.gie
+++ b/test/gie/builtins.gie
@@ -4709,7 +4709,7 @@ Oblique Stereographic Alternative
===============================================================================
-------------------------------------------------------------------------------
-operation +proj=sterea +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5
+operation +proj=sterea +ellps=GRS80
-------------------------------------------------------------------------------
tolerance 0.1 mm
accept 2 1
@@ -4732,7 +4732,7 @@ accept -200 -100
expect -0.001796631 -0.000904369
-------------------------------------------------------------------------------
-operation +proj=sterea +R=6400000 +lat_1=0.5 +lat_2=2 +n=0.5
+operation +proj=sterea +R=6400000
-------------------------------------------------------------------------------
tolerance 0.1 mm
accept 2 1
@@ -4754,6 +4754,58 @@ expect -0.001790493 0.000895247
accept -200 -100
expect -0.001790493 -0.000895247
+-------------------------------------------------------------------------------
+operation +proj=sterea +ellps=GRS80 +lat_0=90
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept 0 90
+expect 0 0
+accept 0 89
+expect 0.000000000000 -111696.700323081997
+accept 0 45
+expect 0.000000000000 -5291160.727484324016
+accept 0 0
+expect 0.000000000000 -12713600.098641794175
+
+-------------------------------------------------------------------------------
+operation +proj=sterea +ellps=GRS80 +lat_0=89
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept 0 90
+expect 0.000000000000 111696.700314355621
+accept 0 89
+expect 0.000000000000 0
+accept 0 45
+expect 0.000000000000 -5160845.342319893651
+accept 0 0
+expect 0.000000000000 -12493602.143489977345
+
+-------------------------------------------------------------------------------
+operation +proj=sterea +ellps=GRS80 +lat_0=-90
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept 0 -90
+expect 0 0
+accept 0 -89
+expect 0.000000000000 111696.700323081997
+accept 0 -45
+expect 0.000000000000 5291160.727484324016
+accept 0 0
+expect 0.000000000000 12713600.098641794175
+
+-------------------------------------------------------------------------------
+operation +proj=sterea +ellps=GRS80 +lat_0=-89
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept 0 -90
+expect 0.000000000000 -111696.700314355621
+accept 0 -89
+expect 0.000000000000 0
+accept 0 -45
+expect 0.000000000000 5160845.342319893651
+accept 0 0
+expect 0.000000000000 12493602.143489977345
+
===============================================================================
Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)