aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2016-02-02 14:06:31 +0100
committerEven Rouault <even.rouault@spatialys.com>2016-02-02 14:06:31 +0100
commitf3f9f0ca569e6cd14e4d468dfa783881bdd35343 (patch)
treee2e4fbd450741f03f4ae3979655b718ba7a252e4 /src
parentb479455a3eb9c1563e29b410f5d30fa5ca61cf48 (diff)
downloadPROJ-f3f9f0ca569e6cd14e4d468dfa783881bdd35343.tar.gz
PROJ-f3f9f0ca569e6cd14e4d468dfa783881bdd35343.zip
GTX grids: ignore shift values whose abs value is > 1000
This partially reverts https://github.com/OSGeo/proj.4/commit/338ea581 (#271) to solve issue with naptrans2008.gtx grid mentioned in http://lists.maptools.org/pipermail/proj/2016-February/007327.html
Diffstat (limited to 'src')
-rw-r--r--src/pj_apply_vgridshift.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pj_apply_vgridshift.c b/src/pj_apply_vgridshift.c
index 7f82d838..297211c1 100644
--- a/src/pj_apply_vgridshift.c
+++ b/src/pj_apply_vgridshift.c
@@ -151,7 +151,11 @@ int pj_apply_vgridshift( PJ *defn, const char *listname,
+ cvs[grid_ix + 1 + (grid_iy+1) * ct->lim.lam]
* (grid_x) * (grid_y);
- if( value == -88.88880f ) /* nodata? */
+ /* nodata? */
+ /* GTX official nodata value if -88.88880f, but some grids also */
+ /* use other big values for nodata (e.g naptrans2008.gtx has */
+ /* nodata values like -2147479936), so test them too */
+ if( value > 1000 || value < -1000 || value == -88.88880f )
value = HUGE_VAL;
else
{