Setting line width according to scale

Ehud Shabtai eshabtai at GMAIL.COM
Sun Apr 2 09:07:09 EDT 2006


I wasn't aware to the fact that MINSCALE and MAXSCALE can be used in
the CLASS section. Clearly this is much better than defining different
LAYERS as I did.

I'll take a look at the SIZEUTNIS option, it might also be a good solution.

Thanks for your help.

On 4/2/06, Stephen Woodbridge <woodbri at swoodbridge.com> wrote:
> This is clearly the "standard" way to do it based on most of the
> mapfiles I have seen or created. There is another way that you can do it
> by defining your widths in real units instead of pixels. This is done
> with SIZEUNITS, so if you set the width of the road in feet or meters
> then as you zoom in it will scale directly proportional to the zoom scale.
>
> -Steve
>
> Bart van den Eijnden (OSGIS) wrote:
> > The best thing would be to define multiple classes for 1 layer, and use
> > MINSCALE, MAXSCALE on the classes.
> >
> > I don't know of any way to do some kind of automatic/proportional
> > scaling, but maybe someone else knows  .....
> >
> > Best regards,
> > Bart
> >
> > Ehud Shabtai wrote:
> >
> >> Hi,
> >>
> >> After using mapserver for a while now, I decided to clean out some of
> >> the mess I have in the map file.
> >>
> >> I'm using mapserver mainly for drawing roads of different classes. My
> >> current configuration has about 8 different layers, all very similar
> >> to each other except for the line width value. This seems like I'm
> >> abusing the layer definition as these are not really different layers
> >> but a hack to allow drawing roads in different widths according to the
> >> scale.
> >>
> >> Is there a better way? Can I define the width to be proportional to
> >> the current scale?
> >>
> >> I'm using a circle symbol to draw my lines.
> >>
> >> Thanks,
> >>
> >> --
> >> Ehud Shabtai
> >> http://www.freemap.co.il/map/
> >>
> >>
> >>
> >>
> >>
> >
> >
>



--
Ehud Shabtai
http://www.freemap.co.il/map/



More information about the mapserver-users mailing list