aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhil Elson <pelson.pub@gmail.com>2018-12-21 14:04:04 +0000
committerPhil Elson <pelson.pub@gmail.com>2018-12-24 07:24:30 +0000
commit5d39ae0bb01d142a69552ce3553dd61b75db4ae8 (patch)
tree6f109a0509e0348dda8e40a6c7ee926a4ef1b988 /src
parentac6f0021a3ce6110e5a0a917aec9c0c614443e84 (diff)
downloadPROJ-5d39ae0bb01d142a69552ce3553dd61b75db4ae8.tar.gz
PROJ-5d39ae0bb01d142a69552ce3553dd61b75db4ae8.zip
Fixed rHealpix projection, closing #1206.
Numerical test results based on function output, rather than mathematical derivation. Verified global coverage with graphical eyeballing through cartopy.
Diffstat (limited to 'src')
-rw-r--r--src/PJ_healpix.c4
1 files changed, 2 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);
}