From 10a30bb539be1afb25952b19af8bbe72e1b13b56 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 26 Aug 2019 21:44:21 +0200 Subject: Fix 6.0 regression regarding +init=epsg:4326 +over +to +init=epsg:3857 +over with longitudes outside of [-180,180] --- src/apply_gridshift.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/apply_gridshift.cpp') 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; } -- cgit v1.2.3