[mapserver-users] Map File for Open Street Map symbology
Stephen Woodbridge
woodbri at swoodbridge.com
Tue Jan 13 11:12:34 PST 2009
thomas bonfort wrote:
> http://code.google.com/p/mapserver-utils/source/browse/trunk/
>
> you'll need the code from the mapserver graphics sandbox (rev 8254 is
> preferred as it doesn't have the cairo code in it yet)
Hi Thomas,
I have been looking over your osm mapfile and have a few questions.
1) As you mentioned in your original post, I should grab some code from
a sandbox, what does this have in it over say todays svn?
2) I noticed you have both:
LABELITEM "name"
and
TEXT ([ref])
Does the TEXT override the LABELITEM for the given class it is in? and
then default to the LABELITEM if it is not present? I guess this seems
logical, but I never thought about it before.
3) This looks a little strange. It looks like you are drawing the
outline first without the body of the road, then drawing the body of the
road afterwards.
STYLE
WIDTH _motorway_width
OUTLINEWIDTH 1
OUTLINECOLOR _motorway_ol_clr
MINWIDTH _motorway_minwidth
MAXWIDTH _motorway_maxwidth
END
STYLE
WIDTH _motorway_width
COLOR _motorway_clr
MINWIDTH _motorway_minwidth
MAXWIDTH _motorway_maxwidth
END
Why not draw it like in a single pass? are there quality issues with this?
STYLE
WIDTH _motorway_width
COLOR _motorway_clr
OUTLINEWIDTH 1
OUTLINECOLOR _motorway_ol_clr
MINWIDTH _motorway_minwidth
MAXWIDTH _motorway_maxwidth
END
Or draw it like where (_motorway_width + 2) is a value not an expression:
STYLE
WIDTH _motorway_width + 2
COLOR _motorway_ol_clr
MINWIDTH _motorway_minwidth
MAXWIDTH _motorway_maxwidth
END
STYLE
WIDTH _motorway_width
COLOR _motorway_clr
MINWIDTH _motorway_minwidth
MAXWIDTH _motorway_maxwidth
END
I assume this is slower because you have to draw all the pixels between
the outlines.
4) I have not seen MINWIDTH and MAXWIDTH before. What do these do? Isn't
the width fixed? Or is this controlling the how wide the antialiasing is
allowed to propagate?
Wow! After 10 years of working with mapfile files there is still a lot
of new interesting stuff to learn!
Thank you for sharing this!
Best regards,
-Steve W
More information about the MapServer-users
mailing list