aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/projections/robin.cpp5
-rw-r--r--test/gie/builtins.gie7
2 files changed, 9 insertions, 3 deletions
diff --git a/src/projections/robin.cpp b/src/projections/robin.cpp
index 3c4d9f07..8b646502 100644
--- a/src/projections/robin.cpp
+++ b/src/projections/robin.cpp
@@ -142,6 +142,10 @@ static PJ_LP robin_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, invers
lp.phi = (5 * i + t) * DEG_TO_RAD;
if (xy.y < 0.) lp.phi = -lp.phi;
lp.lam /= V(X[i], t);
+ if( fabs(lp.lam) > M_PI ) {
+ proj_errno_set(P, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT);
+ lp = proj_coord_error().lp;
+ }
}
return lp;
}
@@ -155,4 +159,3 @@ PJ *PROJECTION(robin) {
return P;
}
-
diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie
index 1c5eb3be..24c5ac35 100644
--- a/test/gie/builtins.gie
+++ b/test/gie/builtins.gie
@@ -2327,7 +2327,7 @@ Krovak
===============================================================================
-------------------------------------------------------------------------------
-operation +proj=krovak +ellps=GRS80
+operation +proj=krovak +ellps=GRS80
-------------------------------------------------------------------------------
tolerance 0.1 mm
accept 2 1
@@ -3666,7 +3666,7 @@ Nell-Hammer
===============================================================================
-------------------------------------------------------------------------------
-operation +proj=nell_h +a=6400000
+operation +proj=nell_h +a=6400000
-------------------------------------------------------------------------------
tolerance 0.1 mm
accept 2 1
@@ -4833,6 +4833,9 @@ expect 0 -89.5
accept 0.000000000000 -8654720.000000000000
expect 0 -90
+accept 17250000 100000
+expect failure errno lat_or_lon_exceed_limit
+
===============================================================================
Roussilhe Stereographic