Skip to content

Commit

Permalink
Merge pull request #349 from rouault/ignore_big_values_in_gtx
Browse files Browse the repository at this point in the history
GTX grids: ignore shift values whose abs value is > 1000
  • Loading branch information
hobu committed Feb 2, 2016
2 parents b479455 + f3f9f0c commit a12bfb7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pj_apply_vgridshift.c
Expand Up @@ -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
{
Expand Down

0 comments on commit a12bfb7

Please sign in to comment.