diff options
| -rw-r--r-- | src/projections/stere.cpp | 5 | ||||
| -rw-r--r-- | test/gie/builtins.gie | 26 |
2 files changed, 30 insertions, 1 deletions
diff --git a/src/projections/stere.cpp b/src/projections/stere.cpp index abc4aa13..3fff722d 100644 --- a/src/projections/stere.cpp +++ b/src/projections/stere.cpp @@ -86,7 +86,10 @@ static PJ_XY stere_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forwar sinphi = -sinphi; /*-fallthrough*/ case N_POLE: - xy.x = Q->akm1 * pj_tsfn (lp.phi, sinphi, P->e); + if( fabs(lp.phi - M_HALFPI) < 1e-15 ) + xy.x = 0; + else + xy.x = Q->akm1 * pj_tsfn (lp.phi, sinphi, P->e); xy.y = - xy.x * coslam; break; } diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index def30206..add5d925 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -5419,6 +5419,32 @@ accept -200 -100 expect -0.001790493 -0.000895247 +------------------------------------------------------------------------------- +operation +proj=stere +ellps=GRS80 +lat_0=90 +lat_ts=70 +------------------------------------------------------------------------------- +tolerance 1e-15m +accept 0 90 +expect 0 0 +roundtrip 1 + +tolerance 0.1 mm +accept 20 70 +expect 748315.3282 -2055979.4669 +roundtrip 1 + +------------------------------------------------------------------------------- +operation +proj=stere +ellps=GRS80 +lat_0=-90 +lat_ts=-70 +------------------------------------------------------------------------------- +tolerance 1e-15m +accept 0 -90 +expect 0 0 +roundtrip 1 + +tolerance 0.1 mm +accept 20 -70 +expect 748315.3282 2055979.4669 +roundtrip 1 + =============================================================================== # Oblique Stereographic Alternative # Azimuthal, Sph&Ell |
