aboutsummaryrefslogtreecommitdiff
path: root/src/apply_gridshift.cpp
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2019-08-27 00:10:15 +0200
committerKristian Evers <kristianevers@gmail.com>2019-08-27 00:10:15 +0200
commitf059b90ab4c52a67344886a76deecaeb53299ebd (patch)
tree72711ba7247051c71f48af8db382ddef0ce60e50 /src/apply_gridshift.cpp
parent5a504f5491c83f2e185ee3e5a72140257c1c79de (diff)
parentbdaf9a883ec640c1db66217788cbfbc4a0a4a254 (diff)
downloadPROJ-f059b90ab4c52a67344886a76deecaeb53299ebd.tar.gz
PROJ-f059b90ab4c52a67344886a76deecaeb53299ebd.zip
Merge remote-tracking branch 'osgeo/master'6.2.0
Diffstat (limited to 'src/apply_gridshift.cpp')
-rw-r--r--src/apply_gridshift.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/apply_gridshift.cpp b/src/apply_gridshift.cpp
index fcd9fa01..e6c7b2b1 100644
--- a/src/apply_gridshift.cpp
+++ b/src/apply_gridshift.cpp
@@ -344,7 +344,14 @@ PJ_LP proj_hgrid_apply(PJ *P, PJ_LP lp, PJ_DIRECTION direction) {
ct = find_ctable(P->ctx, lp, P->gridlist_count, P->gridlist);
if (ct == nullptr || ct->cvs == nullptr) {
- pj_ctx_set_errno( P->ctx, PJD_ERR_FAILED_TO_LOAD_GRID );
+ if( P->gridlist_count == 1 &&
+ strcmp(P->gridlist[0]->gridname, "null") == 0) {
+ // TODO: remove this particular case that is put there just to be
+ // able to handle longitudes outside of -180,180
+ out = lp;
+ } else {
+ pj_ctx_set_errno( P->ctx, PJD_ERR_FAILED_TO_LOAD_GRID );
+ }
return out;
}