[mapserver-users] WMS display of NODATA pixels

Smith, Michael Michael.Smith at maine.gov
Fri Jan 31 13:18:23 PST 2014


Hi group,

I am having a heck of a time figuring out how to have MapServer ignore NODATA values in a WMS.  Please help!

***THE DATA

GDAL shows the NODATA value of this TIFF to be -999:

C:\WorkSpace\medem2>gdalinfo mosaic100.tif
  <snip>
  NoData Value=-999

I also confirmed this in ArcGIS, the NoData pixels do not draw.  The raster is a 32-bit float (a DEM).

***THE MAPFILE

I have tried the following, which the docs all indicate should work:

  PROCESSING "NODATA=-999"  (nodata pixels show as black)

 PROCESSING "SCALE=-3,950"  (again nodata pixels -999 show as black, it does scale the rest of the data)

  CLASS
    EXPRESSION ([pixel] > -999)   (whole image is white)
  END

  PROCESSING "LUT=0:0,100:128,500:192,951:255"  (nodata pixels show black, it does apply the LUT correctly otherwise)

***CHECK IT OUT

You can see this for yourself if you like, use this WMS:
                http://mapserver.maine.gov/wms/mapserv.exe?map=c:/wms/topos.map&

Choose the Maine_DEM_2m group

===============================
Michael Smith MS GISP
State GIS Manager, Maine Office of GIS
State of Maine, Office of Information Technology
michael.smith _at_ maine.gov 207-215-5530

Board Member, Maine GeoLibrary
Education Chair, Maine GIS Users Group
State Rep, National States Geographic Information Council
[cid:image001.jpg at 01CF1E9E.2C978FB0]

State House Station 145
51 Commerce Drive
Augusta, ME 04333-0145
69o 47' 58.9"W  44o 21' 54.8"N
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140131/ea4259db/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 9032 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140131/ea4259db/attachment.jpg>


More information about the MapServer-users mailing list