diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-12-26 09:33:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-26 09:33:02 +0100 |
| commit | 355d681ed88019e97742344bd642c2fd97e700a1 (patch) | |
| tree | c6b20286abda6096225da904f2c668711b8e24d3 | |
| parent | 14481b2f63ec8830ed23b18711637ad8066661f5 (diff) | |
| parent | 5d39ae0bb01d142a69552ce3553dd61b75db4ae8 (diff) | |
| download | PROJ-355d681ed88019e97742344bd642c2fd97e700a1.tar.gz PROJ-355d681ed88019e97742344bd642c2fd97e700a1.zip | |
Merge pull request #1207 from pelson/healpix_fix
Fixed rHealpix projection, closing #1206.
| -rw-r--r-- | src/PJ_healpix.c | 4 | ||||
| -rw-r--r-- | test/gie/builtins.gie | 19 |
2 files changed, 21 insertions, 2 deletions
diff --git a/src/PJ_healpix.c b/src/PJ_healpix.c index ee575abf..3a88695f 100644 --- a/src/PJ_healpix.c +++ b/src/PJ_healpix.c @@ -499,8 +499,8 @@ static XY combine_caps(double x, double y, int north_square, int south_square, double a[2]; /* Workaround cppcheck git issue */ double* pa = a; - pa[0] = -3*M_FORTPI + ((inverse == 0) ? 0 : capmap.cn) *M_HALFPI; - pa[1] = M_HALFPI; + pa[0] = -3*M_FORTPI + ((inverse == 0) ? pole : capmap.cn) *M_HALFPI; + pa[1] = ((capmap.region == north) ? 1 : -1) *M_HALFPI; vector_add(ret_dot, a, vector); } diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 1154febc..48be629c 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -2006,6 +2006,25 @@ expect -0.001790493 0.000759909 accept -200 -100 expect -0.001790493 -0.000759909 +------------------------------------------------------------------------------- +operation +proj=rhealpix +south_square=2 +north_square=3 +------------------------------------------------------------------------------- +tolerance 1 m +accept 45 50 +expect 10806592 10007554 +accept 45 -50 +expect 5003777 -5802815 +accept 135 50 +expect 15011332 5802815 + +direction inverse +accept 10806592 10007554 +expect 45 50 +accept 5003777 -5802815 +expect 45 -50 +accept 15011332 5802815 +expect 135 50 + =============================================================================== Interrupted Goode Homolosine |
