aboutsummaryrefslogtreecommitdiff
path: root/src/projections
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-05-24 20:03:48 +0200
committerGitHub <noreply@github.com>2020-05-24 20:03:48 +0200
commit5d502d356e16ef81f481eb82dcdeba0ea3ab1f9e (patch)
treec4afb8963bd003e13fd872f6f0f3d611faddeac8 /src/projections
parent35dc7d00f92b4a575a2bbc1d90767a9c3e67557c (diff)
parentf7f3b98a5334bdb2dae186e8ce806eece8432a96 (diff)
downloadPROJ-5d502d356e16ef81f481eb82dcdeba0ea3ab1f9e.tar.gz
PROJ-5d502d356e16ef81f481eb82dcdeba0ea3ab1f9e.zip
Merge pull request #2230 from rouault/limit_peirce_q_to_northern_hemisphere
Limit peirce_q to northern hemisphere, and fix images for adams_hemi, guyou and peirce_q
Diffstat (limited to 'src/projections')
-rw-r--r--src/projections/adams.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/projections/adams.cpp b/src/projections/adams.cpp
index 88fce8e5..e704c687 100644
--- a/src/projections/adams.cpp
+++ b/src/projections/adams.cpp
@@ -118,6 +118,10 @@ static PJ_XY adams_forward(PJ_LP lp, PJ *P) {
}
break;
case PEIRCE_Q: {
+ if( lp.phi < -TOL ) {
+ proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+ return proj_coord_error().xy;
+ }
const double sl = sin(lp.lam);
const double cl = cos(lp.lam);
const double cp = cos(lp.phi);