diff options
| -rwxr-xr-x | nad/testvarious | 18 | ||||
| -rw-r--r-- | src/PJ_aeqd.c | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/nad/testvarious b/nad/testvarious index a1d11987..fded86ea 100755 --- a/nad/testvarious +++ b/nad/testvarious @@ -663,6 +663,24 @@ $EXE -f '%.13f' \ -E >>${OUT} <<EOF 13 -10 EOF +echo "##############################################################" >> ${OUT} +echo "Test bug 244 " >> ${OUT} +# +$EXE -f '%.12f' \ + +init=epsg:4326 \ + +to +proj=aeqd +lon_0=130.0 +lat_0=40.0 +a=6378137 +b=6378137 +units=m +no_defs \ + -E >>${OUT} <<EOF +-140.100000 -87.000000 +EOF +echo "##############################################################" >> ${OUT} +echo "Test bug 244 (2)" >> ${OUT} +# +$EXE -f '%.12f' \ + +proj=aeqd +lon_0=130.0 +lat_0=40.0 +a=6378137 +b=6378137 +units=m +no_defs \ + +to +init=epsg:4326 \ + -E >>${OUT} <<EOF +987122.4183302754536 -14429896.5395309105515 +EOF ############################################################################## # Done! # do 'diff' with distribution results diff --git a/src/PJ_aeqd.c b/src/PJ_aeqd.c index fa7c3f63..d564455d 100644 --- a/src/PJ_aeqd.c +++ b/src/PJ_aeqd.c @@ -210,7 +210,7 @@ INVERSE(s_inverse); /* spherical */ xy.y = (cosc - P->sinph0 * sin(lp.phi)) * c_rh; xy.x *= sinc * P->cosph0; } - lp.lam = xy.y == 0. ? 0. : atan2(xy.x, xy.y); + lp.lam = atan2(xy.x, xy.y); } else if (P->mode == N_POLE) { lp.phi = HALFPI - c_rh; lp.lam = atan2(xy.x, -xy.y); |
