[mapserver-users] Colorrange in Mapserver

Christopher Dedels cdedels at gmail.com
Tue Apr 19 17:20:02 PDT 2011


Can somebody tell me how to use a colorrange in Mapserver?  Based on some
research, I have the following in my mapfile.  Unfortunately my raster shows
up in grey scale.

MAP
        SIZE 800 500
        UNITS dd

        EXTENT -123.893740048754 46.1485674734785 -123.773066332134
46.2230446882423

        PROJECTION
                "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
        END

        IMAGECOLOR 255 255 255
        IMAGEQUALITY 95
        IMAGETYPE png

        OUTPUTFORMAT
                NAME png
                DRIVER "GD/PNG"
                MIMETYPE "image/png"
                IMAGEMODE RGBA
                EXTENSION "png"
        END

        LAYER
                NAME "Gradient"
                TYPE RASTER
                DATA "/tmp/grid5m7rmd.tif"
                STATUS DEFAULT
                PROJECTION
                        "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
                END
                CLASS
                        STYLE
                                COLORRANGE 0 255 255 255 255 0
                                DATARANGE 0.0 100.0
                                RANGEITEM "[pixel]"
                        END
                END
        END
END

I am using Mapserver 4.8.1.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110419/6268d142/attachment.htm>


More information about the MapServer-users mailing list