aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Knudsen <busstoptaktik@users.noreply.github.com>2017-11-17 08:20:13 +0100
committerGitHub <noreply@github.com>2017-11-17 08:20:13 +0100
commit6bcba7023e52b712dde7dc348efc0b01147cb994 (patch)
tree6e66efad9a93f193e4a6bb7c56f9611bab7b0c8d
parent47a44d4672658f8b9e1eee7d4a412c7940e28900 (diff)
parentf46ba4b038e4910eef84e45b7e4c06c9f6827461 (diff)
downloadPROJ-6bcba7023e52b712dde7dc348efc0b01147cb994.tar.gz
PROJ-6bcba7023e52b712dde7dc348efc0b01147cb994.zip
Merge pull request #671 from busstoptaktik/use-geoc-in-factors
Switch pj_factors to use proj_geoc_lat
-rw-r--r--src/pj_factors.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pj_factors.c b/src/pj_factors.c
index 69d59e49..3c2e97cb 100644
--- a/src/pj_factors.c
+++ b/src/pj_factors.c
@@ -14,6 +14,8 @@
int pj_factors(LP lp, PJ *P, double h, struct FACTORS *fac) {
double cosphi, t, n, r;
int err;
+ PJ_COORD coo = {{0, 0, 0, 0}};
+ coo.lp = lp;
err = proj_errno_reset (P);
@@ -38,7 +40,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 */