diff options
| -rw-r--r-- | src/projections/laea.cpp | 3 | ||||
| -rw-r--r-- | test/gie/builtins.gie | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/projections/laea.cpp b/src/projections/laea.cpp index 22fb1691..11b89a96 100644 --- a/src/projections/laea.cpp +++ b/src/projections/laea.cpp @@ -248,6 +248,9 @@ PJ *PROJECTION(laea) { P->destructor = destructor; t = fabs(P->phi0); + if (t > M_HALFPI + EPS10 ) { + return destructor(P, PJD_ERR_LAT_LARGER_THAN_90); + } if (fabs(t - M_HALFPI) < EPS10) Q->mode = P->phi0 < 0. ? S_POLE : N_POLE; else if (fabs(t) < EPS10) diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 313d0631..0082d5cf 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -2457,6 +2457,11 @@ tolerance 10 cm accept 45 45 roundtrip 100 +------------------------------------------------------------------------------- +Test error in projection setup +------------------------------------------------------------------------------- +operation +proj=laea +ellps=GRS80 +lat_0=91 +expect failure errno lat_larger_than_90 =============================================================================== Lagrange |
