[mapserver-users] Trouble coloring a raster

Brent Fraser bfraser at geoanalytic.com
Tue Mar 5 12:12:47 PST 2013


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
> 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/01d7ef91/attachment.html>


More information about the mapserver-users mailing list