diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-09-15 05:42:17 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-09-15 06:41:39 +0200 |
| commit | 3bd64e8532521d61119df0a6a365a0a32b5c9b15 (patch) | |
| tree | d959f1c027722e532cc0c088de35e95dccb812d1 | |
| parent | 47fb85bdf0e45bf5660e0b1dbde7b76f8824a87a (diff) | |
| download | PROJ-3bd64e8532521d61119df0a6a365a0a32b5c9b15.tar.gz PROJ-3bd64e8532521d61119df0a6a365a0a32b5c9b15.zip | |
Fix error in implementation of Inverse ellipsoidal orthographic projection (oblique case) that cause convergence to sometimes fail (fixes #2844)
| -rw-r--r-- | src/projections/ortho.cpp | 2 | ||||
| -rw-r--r-- | test/gie/builtins.gie | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/projections/ortho.cpp b/src/projections/ortho.cpp index 908f283d..d2d113ef 100644 --- a/src/projections/ortho.cpp +++ b/src/projections/ortho.cpp @@ -254,7 +254,7 @@ static PJ_LP ortho_e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal, inver const double J11 = -rho * sinphi * sinlam; const double J12 = nu * cosphi * coslam; const double J21 = rho * (cosphi * Q->cosph0 + sinphi * Q->sinph0 * coslam); - const double J22 = nu * Q->sinph0 * Q->cosph0 * sinlam; + const double J22 = nu * Q->sinph0 * cosphi * sinlam; const double D = J11 * J22 - J12 * J21; const double dx = xy.x - xy_new.x; const double dy = xy.y - xy_new.y; diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 9e1d3339..9cebec84 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -4531,6 +4531,16 @@ tolerance 0.1 mm accept 0 -6343600 expect 0 -59.966377950099655436 +------------------------------------------------------------------------------- +# Oblique +# Test case from https://github.com/OSGeo/PROJ/issues/2844 +------------------------------------------------------------------------------- +operation +proj=ortho +ellps=WGS84 +lon_0=23.0 +lat_0=37.0 +tolerance 0.1 mm +accept 120.0 84.0 +expect 663929.0678 5118338.2423 +roundtrip 1 + ------------------------------------------------------------------------------- # Equatorial |
