aboutsummaryrefslogtreecommitdiff
path: root/src/projections/robin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/projections/robin.cpp')
-rw-r--r--src/projections/robin.cpp5
1 files changed, 4 insertions, 1 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;
}
-