aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pj_factors.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pj_factors.c b/src/pj_factors.c
index 69d59e49..e48e8961 100644
--- a/src/pj_factors.c
+++ b/src/pj_factors.c
@@ -14,6 +14,7 @@
int pj_factors(LP lp, PJ *P, double h, struct FACTORS *fac) {
double cosphi, t, n, r;
int err;
+ PJ_COORD coo = {{lp.lam, lp.phi, 0, 0}};
err = proj_errno_reset (P);
@@ -38,7 +39,7 @@ int pj_factors(LP lp, PJ *P, double h, struct FACTORS *fac) {
/* If input latitudes are geocentric, convert to geographic */
if (P->geoc)
- lp.phi = atan(P->rone_es * tan(lp.phi));
+ lp = proj_geoc_lat (P, PJ_INV, coo).lp;
/* If latitude + one step overshoots the pole, move it slightly inside, */
/* so the numerical derivative still exists */