Color ramping

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Wed Nov 10 18:01:20 EST 2004


I don't think there is other than assign a range of ranges to a class
via an expression. For some projects, I have add a COLOR attribute, like
number 1-10 then made a layer with ten classes in it and did the color
assignment that way.

It would be nice to have something like:

COLOR_RAMP
   COLOR_ATTRIBUTE <column_name>
   MIN_VALUE <num1>
   MAX_VALUE <num2>
   MIN_COLOR R G B
   MAX_COLOR R G B
   COLOR_STEP n
   OFF_COLOR R G B
END

Where the value from the column would be interpolated between min and
max value and then assign a color value appropriately between min and
max color. COLOR_STEP would define discreet steps in the color ramp. and
any value outside min and max value would be assign OFF_COLOR

But alas we don't have anything like this :(

-Steve W.

Bob Basques wrote:

> All,
>
> I have the Contour layer displaying fairly quickly now.  The next order
> of business is to display it with a color-ramp.
>
> Are there any programtric ways of accomplishing this with the
> attributes.  I have elevation attribute on each line that I use for
> labelling, I would like to change the colors (color-ramp) via this
> attribute.
>
> Aside from assigning every individual elevation (or groups of
> elevations)  a color, is there a MAPFILE (or Trick) config that could
> make this happen?
>
> Thanks
>
> bobb
>



More information about the mapserver-users mailing list