Skip to content

Commit

Permalink
Merge 9215789 into 4c7364b
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Apr 25, 2019
2 parents 4c7364b + 9215789 commit 8228b11
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/projections/mod_ster.cpp
Expand Up @@ -35,7 +35,12 @@ static PJ_XY e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward */
pow((1. - esphi) / (1. + esphi), P->e * .5)) - M_HALFPI;
schi = sin(chi);
cchi = cos(chi);
s = 2. / (1. + Q->schio * schi + Q->cchio * cchi * coslon);
const double denom = 1. + Q->schio * schi + Q->cchio * cchi * coslon;
if( denom == 0 ) {
proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
return xy;
}
s = 2. / denom;
p.r = s * cchi * sinlon;
p.i = s * (Q->cchio * schi - Q->schio * cchi * coslon);
p = pj_zpoly1(p, Q->zcoeff, Q->n);
Expand Down
4 changes: 4 additions & 0 deletions test/gie/builtins.gie
Expand Up @@ -1853,6 +1853,10 @@ expect 4030931.833981509 1323687.864777399
accept -80.000000000 36.000000000
expect 3450764.261536101 -175619.041820732

# For some reason, does not fail on MacOSX
#accept 60 -45
#expect failure errno tolerance_condition

direction inverse
accept -1800000.000000000 2600000.000000000
expect -157.989285000 64.851559610
Expand Down

0 comments on commit 8228b11

Please sign in to comment.