[mapserver-dev] RFC49: mapfile simplifications and symbology
enhancements
thomas bonfort
thomas.bonfort at gmail.com
Thu Dec 4 16:49:48 EST 2008
> I don't have any more comments on the proposed changes. I don't see strong
> benefits for all of them, but if others do them I'm fine with what is
> proposed.
As I said, some of the modifications don't add much functionality, but
reduce mapfile size and maintainance. I agree that the benefits aren't
widespread, but for road layers rendering there is imho a great
advantage.
I'll take the example of a single class of road types, eg. primary
roads, where you want them to be rendered as a uniform-colored line
for far off zooms, and an outlined color for closer ones (with the
name of the roads that show up when you get a bit closer)
* with the current mapfile keywords, your layer would look something like:
class #for far off views, just a uniform line
minscaledenom 200000
style
color grey
width 1
end
end
class #for closer views when an outline appears
minscaledenom 100000
maxscaledenom 200000
style
width 3
color grey #the outline color
end
style
width 1
color white
end
end
class #closer view, a bit wider
minscaledenom 50000
maxscaledenom 100000
style
width 4
color grey
end
style
width 2
color white
end
end
class #closer view, now labels appear
minscaledenom 25000
maxscaledenom 50000
style
width 5
color grey
end
style
width 3
color white
end
label
[snip label definition]
end
end
[snip repeating this pattern for each scale you want to serve your map
in, each time widening the line widths and repeating the label
definition]
repeat this process for each road class (motorways, trunk roads,
secondary roads, etc...)
* with the proposed changes, the equivalent symbology can be obtained with
sizeunits meters
class
style
maxscaledenom 200000
width 15 #in ground meters
maxwidth 15 #in pixels, largest width for close up views
minwidth 1 #in pixels
color white
outlinecolor grey
outlinewidth 1
end
style #for roads from far off zoom
minscaledenom 100000
color grey
minwidth 1
maxwidth 1
end
label
maxscaledenom 50000
[snip label definition]
end
end
from a mapfile maintainance point of view, I know which one I prefer :)
More information about the mapserver-dev
mailing list