example (this is with an 8bit raster, EXPRESSION refers to the color
number). makes not to much sense to me on an 24bit raster:
NAME "Weisser Hintergrund"
COLOR 255 255 255
COLOR 197 230 189
Mit freundlichem Gruss / Best Regards
From: Frank Rittinger <[hidden email]>
To: [hidden email] Date: Wed, 7 Dec 2005 11:06:53 +0100
Subject: [UMN_MAPSERVER-USERS] change colors of raster images in mapfile
> Hello list,
> I have two b/w raster layers in a mapfile and would like to change
> foreground color of one of them from black to blue.
> If I add class entries to the layers, both layers get displayed in
> same color.
> After reading the raster howto, I got the impression that that's the
> normal behavior because the same color in all images gets the same
> rgb value. Is this connected to color bands?
> Any hints are welcomed,
> Frank Rittinger
> 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.