[Gdal-dev] 'no data' problem with GDAL/Mapserver
Jeff Bullard
jeffbullard at verizon.net
Fri Dec 15 21:53:10 EST 2006
Mapserver is treating raster 'no data' values like they are all zero.
The 'no data' pixels are being rendered in my [0 - 5) class. The actual
'no data' value I am using is 200. I have also tried 9999.
gdalwarp -ot Int16 -srcnodata 9999 -dstnodata 200 -s_srs '+proj=lcc
+lat_0=25N +lat_1=25N +lon_0=95W +units=meters' -t_srs '+proj=latlong
+ellps=WGS84 +datum=WGS84 +no_defs'
NETCDF:'/usr/local/degrib/data/ndfd/conus/200612130500.nc:Astro' /usr/local/degrib/data/ndfd/conus/web/out.tif
Openev verifies that the gdalwarp operation was successful and the
out.tif is good. When I mouse over a 'no data' area openev tells me
"200 [NODATA]". But when I put this same out.tif into a mapfile layer
the same pixels are rendered as a zero.
LAYER # sky raster layer begins here
NAME sky
TYPE RASTER
DATA "/var/www/data/raster/%filename%"
STATUS ON
PROCESSING "SCALE=0,220"
PROCESSING "SCALE_BUCKETS=20"
CLASS
NAME ">95%"
EXPRESSION ([pixel] >= 0 and [pixel] < 5)
STYLE
COLOR 0 0 150
END
END
CLASS
NAME "90-95%"
EXPRESSION ([pixel] >=5 and [pixel] < 10 )
STYLE
COLOR 20 20 20
END
END
CLASS
NAME "85-90%"
EXPRESSION ([pixel] >= 10 and [pixel] < 15)
STYLE
COLOR 40 40 40
END
END
CLASS
NAME "80-85%"
EXPRESSION ([pixel] >= 15 and [pixel] < 20)
STYLE
COLOR 70 70 70
END
END
CLASS
NAME "75-80%"
EXPRESSION ([pixel] >= 20 and [pixel] < 25)
STYLE
COLOR 90 90 90
END
END
CLASS
NAME "nodata"
EXPRESSION ([pixel] = 200)
STYLE
COLOR 240 240 240
END
END
END #End sky layer
More information about the Gdal-dev
mailing list