aboutsummaryrefslogtreecommitdiff
path: root/src/projections/stere.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-03-07 01:02:33 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-03-10 18:01:43 +0100
commitdc4acc001e7d5cd1f4d9af49eeb7e3770a1d5637 (patch)
treedf3e637ff060e8ddfd78cf20eec8c6b741f79690 /src/projections/stere.cpp
parentfc1a72314c31f2a3dfdbce44e4f5025abd57f365 (diff)
downloadPROJ-dc4acc001e7d5cd1f4d9af49eeb7e3770a1d5637.tar.gz
PROJ-dc4acc001e7d5cd1f4d9af49eeb7e3770a1d5637.zip
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.
Diffstat (limited to 'src/projections/stere.cpp')
-rw-r--r--src/projections/stere.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/projections/stere.cpp b/src/projections/stere.cpp
index d95bb7fa..abc4aa13 100644
--- a/src/projections/stere.cpp
+++ b/src/projections/stere.cpp
@@ -5,7 +5,7 @@
#include <math.h>
PROJ_HEAD(stere, "Stereographic") "\n\tAzi, Sph&Ell\n\tlat_ts=";
-PROJ_HEAD(ups, "Universal Polar Stereographic") "\n\tAzi, Sph&Ell\n\tsouth";
+PROJ_HEAD(ups, "Universal Polar Stereographic") "\n\tAzi, Ell\n\tsouth";
namespace { // anonymous namespace
@@ -320,8 +320,7 @@ PJ *PROJECTION(ups) {
/* International Ellipsoid */
P->phi0 = pj_param(P->ctx, P->params, "bsouth").i ? - M_HALFPI: M_HALFPI;
if (P->es == 0.0) {
- proj_errno_set(P, PJD_ERR_ELLIPSOID_USE_REQUIRED);
- return pj_default_destructor (P, ENOMEM);
+ return pj_default_destructor (P, PJD_ERR_ELLIPSOID_USE_REQUIRED);
}
P->k0 = .994;
P->x0 = 2000000.;