aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/PJ_mod_ster.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/PJ_mod_ster.c b/src/PJ_mod_ster.c
index 785285db..3e41b746 100644
--- a/src/PJ_mod_ster.c
+++ b/src/PJ_mod_ster.c
@@ -69,6 +69,10 @@ static LP e_inverse (XY xy, PJ *P) { /* Ellipsoidal, inverse */
cosz = cos(z);
lp.lam = P->lam0;
if (fabs(rh) <= EPSLN) {
+ /* if we end up here input coordinates were (0,0).
+ * pj_inv() adds P->lam0 to lp.lam, this way we are
+ * sure to get the correct offset */
+ lp.lam = 0.0;
lp.phi = P->phi0;
return lp;
}