From dc4acc001e7d5cd1f4d9af49eeb7e3770a1d5637 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 7 Mar 2020 01:02:33 +0100 Subject: utm/ups: make sure to set errno to PJD_ERR_ELLIPSOID_USE_REQUIRED if es==0 ENOMEM was wrongly set after setting PJD_ERR_ELLIPSOID_USE_REQUIRED Note: it is a bit strange to forbid the pure spherical case whereas the maths would allow it. I presume this is due to the typical usage of those methods. --- test/gie/builtins.gie | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 47de961e..1c5eb3be 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -5554,7 +5554,7 @@ expect -0.001790432 -0.000841228 =============================================================================== Universal Polar Stereographic - Azi, Sph&Ell + Azi, Ell south =============================================================================== @@ -5581,6 +5581,10 @@ expect -45.004297076 64.915804281 accept -200 -100 expect -45.001432287 64.914588378 +------------------------------------------------------------------------------- +operation +proj=ups +a=6400000 +------------------------------------------------------------------------------- +expect failure errno ellipsoid_use_required =============================================================================== Urmaev V @@ -5636,7 +5640,7 @@ expect -0.002040721 -0.000785474 =============================================================================== Universal Transverse Mercator (UTM) - Cyl, Sph + Cyl, Ell zone= south =============================================================================== @@ -5674,6 +5678,12 @@ tolerance 0.001 mm accept 12 56 0 2000 expect 687071.43911000 6210141.32675053 0.00000000 2000.0000 + +------------------------------------------------------------------------------- +operation +proj=utm +a=6400000 +zone=30 +------------------------------------------------------------------------------- +expect failure errno ellipsoid_use_required + =============================================================================== van der Grinten (I) Misc Sph -- cgit v1.2.3