From 8a88101fe59eb56a25c8d91d7272353de7140a95 Mon Sep 17 00:00:00 2001 From: erykoff Date: Sat, 5 Mar 2022 07:21:12 -0800 Subject: [PATCH] Increase MAX_ITER so Mollweide forward projection works near the poles. (#3082) --- src/projections/moll.cpp | 2 +- test/gie/builtins.gie | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/projections/moll.cpp b/src/projections/moll.cpp index 87b383368c..f8b52a5ffa 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 1a290294f6..38dfc6a2f0 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