diff options
| author | John Krasting <John.Krasting@noaa.gov> | 2020-05-19 11:22:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-19 17:22:04 +0200 |
| commit | b6b0ae12e306c8b7760e79f338bb0f155340117a (patch) | |
| tree | a2df12c5aa9273ff19d0474dbd775005647598cf | |
| parent | 3ee7c9495b7340fbc189f43d9bb4bf5753307991 (diff) | |
| download | PROJ-b6b0ae12e306c8b7760e79f338bb0f155340117a.tar.gz PROJ-b6b0ae12e306c8b7760e79f338bb0f155340117a.zip | |
Zone Definition Fixes for igh_o projection (#2233)
- Central lon for zone 2 should be -d10, not d10
- Extra lobe was missing for zone 11
- New figure generated
- New test suite values generated
| -rw-r--r-- | docs/source/operations/projections/images/igh_o.png | bin | 384379 -> 383263 bytes | |||
| -rw-r--r-- | src/projections/igh_o.cpp | 10 | ||||
| -rw-r--r-- | test/gie/builtins.gie | 21 |
3 files changed, 22 insertions, 9 deletions
diff --git a/docs/source/operations/projections/images/igh_o.png b/docs/source/operations/projections/images/igh_o.png Binary files differindex 35910f50..6fc8f2ee 100644 --- a/docs/source/operations/projections/images/igh_o.png +++ b/docs/source/operations/projections/images/igh_o.png diff --git a/src/projections/igh_o.cpp b/src/projections/igh_o.cpp index 785a8784..b14d79a5 100644 --- a/src/projections/igh_o.cpp +++ b/src/projections/igh_o.cpp @@ -37,9 +37,11 @@ static const double phi_boundary = (40 + 44/60. + 11.8/3600.) * DEG_TO_RAD; static const double d10 = 10 * DEG_TO_RAD; static const double d20 = 20 * DEG_TO_RAD; +static const double d40 = 40 * DEG_TO_RAD; static const double d50 = 50 * DEG_TO_RAD; static const double d60 = 60 * DEG_TO_RAD; static const double d90 = 90 * DEG_TO_RAD; +static const double d100 = 100 * DEG_TO_RAD; static const double d110 = 110 * DEG_TO_RAD; static const double d140 = 140 * DEG_TO_RAD; static const double d150 = 150 * DEG_TO_RAD; @@ -149,7 +151,9 @@ static PJ_LP igh_o_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, invers case 8: ok = (lp.lam >= -d60-EPSLN && lp.lam <= d90+EPSLN); break; case 9: ok = (lp.lam >= d90-EPSLN && lp.lam <= d180+EPSLN); break; case 10: ok = (lp.lam >= -d180-EPSLN && lp.lam <= -d60+EPSLN); break; - case 11: ok = (lp.lam >= -d60-EPSLN && lp.lam <= d90+EPSLN); break; + case 11: ok = (lp.lam >= -d60-EPSLN && lp.lam <= d90+EPSLN) || + ((lp.lam >= d90-EPSLN && lp.lam <= d100+EPSLN) && + (lp.phi >= -d90-EPSLN && lp.phi <= -d40+EPSLN)); break; case 12: ok = (lp.lam >= d90-EPSLN && lp.lam <= d180+EPSLN); break; } @@ -226,7 +230,7 @@ PJ *PROJECTION(igh_o) { /* sinusoidal zones */ if (!setup_zone(P, Q, 4, pj_sinu, -d140, 0, -d140) || - !setup_zone(P, Q, 5, pj_sinu, d10, 0, d10) || + !setup_zone(P, Q, 5, pj_sinu, -d10, 0, -d10) || !setup_zone(P, Q, 6, pj_sinu, d130, 0, d130) || !setup_zone(P, Q, 7, pj_sinu, -d110, 0, -d110) || !setup_zone(P, Q, 8, pj_sinu, d20, 0, d20) || @@ -250,7 +254,7 @@ PJ *PROJECTION(igh_o) { Q->pj[0]->y0 = Q->dy0; /* mollweide zones (cont'd) */ - if (!setup_zone(P, Q, 2, pj_moll, d10, Q->dy0, d10) || + if (!setup_zone(P, Q, 2, pj_moll, -d10, Q->dy0, -d10) || !setup_zone(P, Q, 3, pj_moll, d130, Q->dy0, d130) || !setup_zone(P, Q, 10, pj_moll, -d110, -Q->dy0, -d110) || !setup_zone(P, Q, 11, pj_moll, d20, -Q->dy0, d20) || diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 34364c2e..76e09ca9 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -2236,13 +2236,13 @@ operation +proj=igh_o +a=6400000 ------------------------------------------------------------------------------- tolerance 0.1 mm accept 2 1 -expect 223538.245169845 111701.072127637 +expect 223197.992883418 111701.072127637 roundtrip 1 accept 2 -1 expect 223708.371313058 -111701.072127637 roundtrip 1 accept -2 1 -expect -223197.992883418 111701.072127637 +expect -223538.245169845 111701.072127637 roundtrip 1 accept -2 -1 expect -223027.866740205 -111701.072127637 @@ -2251,17 +2251,23 @@ roundtrip 1 accept -140.0 22.0 expect -15638150.097869192 2457423.586808016 roundtrip 1 +accept 170.0 70.0 +expect 16560870.317293623 7463176.386461447 +roundtrip 1 accept -10.0 22.0 -expect -954337.891014535 2457423.586808016 +expect -1117010.721276371 2457423.586808016 roundtrip 1 accept 130.0 22.0 expect 14521139.376592822 2457423.586808016 roundtrip 1 +accept -170.0 70.0 +expect -17167948.303394791 7463176.386461447 +roundtrip 1 accept -140.0 67.0 expect -15638150.097869191 7205942.523056464 roundtrip 1 accept -10.0 67.0 -expect 5681.906494287 7205942.523056464 +expect -1117010.721276371 7205942.523056464 roundtrip 1 accept 130.0 67.0 expect 14521139.376592822 7205942.523056464 @@ -2281,17 +2287,20 @@ roundtrip 1 accept 20.0 -67.0 expect 2234021.442552742 -7205942.523056464 roundtrip 1 +accept 95.0 -67.0 +expect 13699006.578494834 -7205942.523056464 +roundtrip 1 accept 150.0 -67.0 expect 16755160.819145564 -7205942.523056464 roundtrip 1 direction inverse accept 200 100 -expect 0.001790492 0.000895247 +expect 0.001790494 0.000895247 accept 200 -100 expect 0.001790491 -0.000895247 accept -200 100 -expect -0.001790494 0.000895247 +expect -0.001790492 0.000895247 accept -200 -100 expect -0.001790496 -0.000895247 |
