diff options
| -rw-r--r-- | src/projections/aea.cpp | 2 | ||||
| -rw-r--r-- | src/strerrno.cpp | 2 | ||||
| -rw-r--r-- | test/gie/builtins.gie | 5 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/projections/aea.cpp b/src/projections/aea.cpp index 9a0c4656..f457e836 100644 --- a/src/projections/aea.cpp +++ b/src/projections/aea.cpp @@ -155,6 +155,8 @@ static PJ *setup(PJ *P) { P->inv = e_inverse; P->fwd = e_forward; + if (fabs(Q->phi1) > M_HALFPI || fabs(Q->phi2) > M_HALFPI) + return destructor(P, PJD_ERR_LAT_LARGER_THAN_90); if (fabs(Q->phi1 + Q->phi2) < EPS10) return destructor(P, PJD_ERR_CONIC_LAT_EQUAL); Q->n = sinphi = sin(Q->phi1); diff --git a/src/strerrno.cpp b/src/strerrno.cpp index 5dedef98..a9310a55 100644 --- a/src/strerrno.cpp +++ b/src/strerrno.cpp @@ -30,7 +30,7 @@ pj_err_list[] = { "acos/asin: |arg| >1.+1e-14", /* -19 */ "tolerance condition error", /* -20 */ "conic lat_1 = -lat_2", /* -21 */ - "lat_1 >= 90", /* -22 */ + "lat_0, lat_1 or lat_2 >= 90", /* -22 */ "lat_1 = 0", /* -23 */ "lat_ts >= 90", /* -24 */ "no distance between control points", /* -25 */ diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 15bbaf05..c4f849a4 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -63,6 +63,11 @@ expect -0.001790494 0.000895246 accept -200 -100 expect -0.001790493 -0.000895247 +operation +proj=aea +ellps=GRS80 +lat_1=900 +expect failure errno lat_larger_than_90 + +operation +proj=aea +ellps=GRS80 +lat_2=900 +expect failure errno lat_larger_than_90 =============================================================================== Azimuthal Equidistant |
