aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2016-10-18 17:32:20 +0200
committerKristian Evers <kristianevers@gmail.com>2016-10-18 17:32:20 +0200
commit0eccceb7e89a798d07390f65f3261cdf85a69ff6 (patch)
tree39a2667afb8d1a55b5468d7b1439a35602ab8b8b /src
parent93024d9c167ef503a62992a3f266ba377536398f (diff)
downloadPROJ-0eccceb7e89a798d07390f65f3261cdf85a69ff6.tar.gz
PROJ-0eccceb7e89a798d07390f65f3261cdf85a69ff6.zip
fixes issue #161 [alsk - Inverse problem at the origin long/lat (-152,64)]
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;
}