diff options
| -rw-r--r-- | src/projections/omerc.cpp | 3 | ||||
| -rw-r--r-- | test/gie/builtins.gie | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/projections/omerc.cpp b/src/projections/omerc.cpp index c33f6489..4d78fbef 100644 --- a/src/projections/omerc.cpp +++ b/src/projections/omerc.cpp @@ -191,6 +191,9 @@ PJ *PROJECTION(omerc) { gamma = alpha_c; } else alpha_c = aasin(P->ctx, D*sin(gamma0 = gamma)); + if( fabs(fabs(P->phi0) - M_HALFPI) <= TOL ) { + return pj_default_destructor(P, PJD_ERR_LAT_0_OR_ALPHA_EQ_90); + } P->lam0 = lamc - aasin(P->ctx, .5 * (F - 1. / F) * tan(gamma0)) / Q->B; } else { diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index adaa98d9..bbaca7ba 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -3962,6 +3962,11 @@ tolerance 1 mm accept 2 1 expect -3569.825230822232 -5093592.310871849768 +------------------------------------------------------------------------------- +operation +proj=omerc +R=1 +alpha=0 +lat_0=90 +------------------------------------------------------------------------------- +expect failure errno lat_0_or_alpha_eq_90 + =============================================================================== Ortelius Oval |
