From 0eccceb7e89a798d07390f65f3261cdf85a69ff6 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 18 Oct 2016 17:32:20 +0200 Subject: fixes issue #161 [alsk - Inverse problem at the origin long/lat (-152,64)] --- src/PJ_mod_ster.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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; } -- cgit v1.2.3