Color ramping
Ken Lord
kenlord at GMAIL.COM
Wed Nov 10 18:04:54 PST 2004
Hi Bob,
I have a method to symbolize contours the way I think you want. The
only bother is adding an attribute or two to your contours shapefile
(or spatial table etc).
In my contour shapefile, I have an attribute that distinguishes
between major and minor contours in my dataset (for example to
distinguish 50m contour intervals from an intermediate set of 10m
contours). The layer is then classified in my map file accordingly.
This is also useful if you want to hide the minor contours when you zoom out.
If you want to get trickier, you can add yet another attribute, that
distinguishes another subset of contours if your map is intended to be
viewed from extremely zoomed in to zoomed out scales. (for example to
show just 100m contours in the above example). This takes expressions
that are a little more complex in the layer classes, that checks both
attributes.
Check out the results in my website:
http://24.87.220.99/ms/iwafs.html --the site will be very slow if I'm
playing my Star Wars game! hehe
... in the initial map view, you see 20m and 100m contours, the 100m's
are thicker and brighter than the 20m's.
... if you dare to zoom in far enough, you'll see 2m contours
displayed. Click on the 'Legend' button at the top to see the
symbolization of the contours, and the scale ranges at which they
appear.
I'm sure you could also accomplish the same thing in another manner by
reading the contours from a MapInfo table using an OGR connection, if
you are a wizz at making the MapInfo table.
Cheers,
Ken Lord
On Wed, 10 Nov 2004 16:50:29 -0600, Bob Basques
<bob.basques at ci.stpaul.mn.us> 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
>
--
==============================
Ken Lord B.Sc., A.Dipl.T.H.
7488 Magnolia Terrace
Burnaby BC, V5E 4L1
kenlord at gmail.com
klord at bgcengineering.com
More information about the MapServer-users
mailing list