[OSM-talk] Osmarender 1.3 with support for symbols and nested rules
Etienne Cherdlu
openstreetmap-L at gj0.net
Mon Apr 10 09:06:16 BST 2006
Folks
I've just put up Osmarender 1.3 on the wiki.
This version has support for several new features:
1) You can defined symbols in your rules file for churches and post
offices etc and render them according to a rule. Example:
<rule k="amenity" v="place_of_worship">
<symbol xlink:href="#church" />
</rule>
2) You can define nested rules which allows rendering based on a
combination of two different key values. For example:
<rule k="amenity" v="place_of_worship">
<rule k="denomination" v="anglican"><symbol xlink:href="#church" /></rule>
<rule k="denomination" v="jewish"><symbol xlink:href="#synagogue" /></rule>
</rule>
This is an "and" clause. If (amenity="place_of_worship" and
demonination="anglican") then draw a church.
3) Nested rules and symbols enable one way streets to be described
using the following pattern:
<rule k="highway" v="motorway">
<rule k="oneway" v="1"><line class='motorway oneway' /></rule>
<rule k="oneway" v="-1"><line class='motorway otherway' /></rule>
</rule>
The key oneway=1 draws an arrow in the same direction the segment was
originally drawn. oneway=-1 draws an arrow in the opposite direction
to the way the segment was originally drawn.
4) A width key can now be specified on a segment to override the
normal width at which it is rendered. This is mainly to provide a way
of specifying the width of rivers. So, for example, <tag k="width"
v="30"/> would draw a 30px wide river segment. Currently there is no
scaling mechansim so it will always be 30px wide whatever the scale of
the map. This is not ideal.
5) An SVG <defs> element can now be included in the rules file
containing style, symbol, marker and other elements. The old <style>
tag in the rules file is now deprecated.
6) Finally, I have put up a new version of the osm-map-features.xml
rules file that contains implementations of all of the new features
described above.
--
Etienne
More information about the talk
mailing list