aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerykoff <erykoff@stanford.edu>2022-03-05 07:21:12 -0800
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2022-03-05 15:21:36 +0000
commit8a88101fe59eb56a25c8d91d7272353de7140a95 (patch)
tree1e0767a5088cef9f425c44b1bac443720c1ac697
parentc34b0ac71bc86a4e0af2b6302e4ff7eac16a509d (diff)
downloadPROJ-backport-3082-to-9.0.tar.gz
PROJ-backport-3082-to-9.0.zip
Increase MAX_ITER so Mollweide forward projection works near the poles. (#3082)backport-3082-to-9.0
-rw-r--r--src/projections/moll.cpp2
-rw-r--r--test/gie/builtins.gie12
2 files changed, 13 insertions, 1 deletions
diff --git a/src/projections/moll.cpp b/src/projections/moll.cpp
index 87b38336..f8b52a5f 100644
--- a/src/projections/moll.cpp
+++ b/src/projections/moll.cpp
@@ -10,7 +10,7 @@ PROJ_HEAD(moll, "Mollweide") "\n\tPCyl, Sph";
PROJ_HEAD(wag4, "Wagner IV") "\n\tPCyl, Sph";
PROJ_HEAD(wag5, "Wagner V") "\n\tPCyl, Sph";
-#define MAX_ITER 10
+#define MAX_ITER 30
#define LOOP_TOL 1e-7
namespace { // anonymous namespace
diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie
index 1a290294..38dfc6a2 100644
--- a/test/gie/builtins.gie
+++ b/test/gie/builtins.gie
@@ -3599,6 +3599,18 @@ roundtrip 1
accept -2 -1
expect -201113.698641813 -124066.283433860
roundtrip 1
+accept 0.0 89.99
+expect 0.00 9050917.562466157600
+roundtrip 1
+accept 0.0 89.999
+expect 0.00 9050964.513822982088
+roundtrip 1
+accept 0.0 -89.99
+expect 0.0 -9050917.562466157600
+roundtrip 1
+accept 0.0 -89.999
+expect 0.00 -9050964.513822982088
+roundtrip 1
direction inverse
accept 200 100