[mapserver-users] Trouble coloring a raster

Bistrais, Bob Bob.Bistrais at maine.gov
Tue Mar 5 12:18:22 PST 2013


Yes, I had looked at that webpage and thought I was doing it correctly.  My TIFF is a single band, 8-bit, with no colormap.  Still don't see why it won't display in color.

From: Brent Fraser [mailto:bfraser at geoanalytic.com]
Sent: Tuesday, March 05, 2013 3:13 PM
To: Bistrais, Bob
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Trouble coloring a raster

Bob,
    I'd recommend just re-rendering the raster off-line for performance reasons, but if data management makes that difficult have a look at the  "Classifying Rasters" section of http://www.mapserver.org/input/raster.html#how-are-rasters-added-to-a-map-file.  And Mapserver can only classify a single 8-bit  band (grey or paletted), even if your image is say 3 band RGB.


Best Regards,

Brent Fraser
On 3/5/2013 12:53 PM, Bistrais, Bob wrote:
I have a geotiff raster which represents forested lands.  I'd like it to display in green.  I put in a Style section and specified a color, but try as I might, it always displays in grayscale.  It is an 8-bit unsigned TIFF file.

Below is the layer specification:

LAYER
  NAME "ForestLands"
  GROUP "ForestLands"
  TYPE RASTER
  STATUS on
  DATA "/mapserver_data/StreamBarriers/forestland06.tif"

  METADATA
    "wms_srs"                      "EPSG:4326 EPSG:26919 EPSG:26983 EPSG:26984 EPSG:102113"
    "wms_name"                                "ForestLands"
    "wms_server_version" "1.1.1"
    "wms_format"              "image/png"
  END

  CLASS
    NAME "Forest"
    STYLE
        COLOR 0 250 0
    END
  END

END




_______________________________________________

mapserver-users mailing list

mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>

http://lists.osgeo.org/mailman/listinfo/mapserver-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130305/67f4126e/attachment.html>


More information about the mapserver-users mailing list