change colors of raster images in mapfile

Dylan Keon dbkeon.ml at GMAIL.COM
Wed Dec 7 11:13:27 PST 2005


On 12/7/05, Trond Michelsen <trondmm-mapserver at crusaders.no> wrote:
> On Wed, Dec 07, 2005 at 01:09:57PM +0100, Flavio Hendry wrote:
> > example (this is with an 8bit raster, EXPRESSION refers to the color
> > number). makes not to much sense to me on an 24bit raster:
>
> [...]
>
> >  CLASS
> >    NAME "Weisser Hintergrund"
> >    EXPRESSION "1"
> >    COLOR 255 255 255
> >  END
>
>
> Oooh. Thanks. I've been looking for that feature.
>
> That's actually pretty useful even if you want to keep the
> colors. Because when you define classes like this, they will show up
> in the legend as well.
>
> I only wish it was possible to hide unused classes from the legend.


If you remove the NAME from your class it won't appear in the legend. 
If you need to do it dynamically you could use MapScript to set/unset
the NAME depending upon your condition.

--Dylan



More information about the MapServer-users mailing list