aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHoward Butler <howard@hobu.co>2016-02-02 08:50:44 -0600
committerHoward Butler <howard@hobu.co>2016-02-02 08:50:44 -0600
commita12bfb7c207449c9768fa7591684a0240d2e6898 (patch)
treee2e4fbd450741f03f4ae3979655b718ba7a252e4 /src
parentb479455a3eb9c1563e29b410f5d30fa5ca61cf48 (diff)
parentf3f9f0ca569e6cd14e4d468dfa783881bdd35343 (diff)
downloadPROJ-a12bfb7c207449c9768fa7591684a0240d2e6898.tar.gz
PROJ-a12bfb7c207449c9768fa7591684a0240d2e6898.zip
Merge pull request #349 from rouault/ignore_big_values_in_gtx
GTX grids: ignore shift values whose abs value is > 1000
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
{