[mapserver-users] NoDATA value, transparency for paletted IMG file

ChrisFern yrrman at gmail.com
Tue Apr 26 05:40:46 EDT 2011


Dear All,

I'm trying to figure out how to set the OFFSITE value for an 8bit paletted
img file - I've been searching the archive for quite some time now but
couldn't find an answer :(

I got the following gdalinfo:

Driver: HFA/Erdas Imagine Images (.img)
[..]
Coordinate System is:
GEOGCS["GCS_WGS_1984",
    DATUM["WGS_1984",
        SPHEROID["WGS_1984",6378137.0,298.257223563]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.017453292519943295]]
[..]
Band 1 Block=64x64 Type=Byte, ColorInterp=Palette
[..]
  NoData Value=0
  Overviews: 7197x7624, 3599x3812, 1800x1906, 900x953, 450x477, 225x239
  Metadata:
[..]  Color Table (RGB with 256 entries)
    0: 0,0,0,255
    1: 0,0,0,0
    2: 0,0,0,0
    3: 113,235,47,255
[..]



so the NoData Value corresponds to index 0, with rgb 0,0,0 and opacity 255.


In the mapfile I tried both

OFFSITE 0,0,0 
and
PROCESSING "NoData=0"

which didn't work. "OFFSITE 0", as one could expect, doesn't work either
(generates an error). My output format is 

OUTPUTFORMAT
   NAME png
   DRIVER "GD/PNG"
   MIMETYPE "image/png"
#   IMAGEMODE RGBA
   IMAGEMODE PC256
   EXTENSION "png"
   TRANSPARENT ON
   FORMATOPTION "transparent=on"
END

With my other RGB-Layers with 3bands the above setting works well, we're
overlaying these WMS layers in the Google Earth API (browser plugin) using
the function "ge.createGroundOverlay".


We're using
MapServer version 5.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=THREADS SUPPORTS=GEOS
INPUT=TIFF INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Any idea/clues what might be wrong here? Help is highly appreciated.

Thanks and advance and greetings, 


Chris


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/NoDATA-value-transparency-for-paletted-IMG-file-tp6305135p6305135.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list