[OSM-talk] New version of Osmarender

Etienne 80n80n at gmail.com
Sat Jul 8 02:39:18 BST 2006


I've just put Osmarender 2.0 up on the wiki at
http://wiki.openstreetmap.org/index.php/Osmarender2.xsl and a new rules file
at http://wiki.openstreetmap.org/index.php/Osm-map-features2.xml.

There is a whole lot of new stuff in it and some things might not work right
yet:

* Support for Areas.  Since areas are only supported by one client at the
moment, you can also fake an area by creating a way and tagging it as if it
were an area (eg amenity=parking).  If you do this you'll need to change
them from ways the areas once full area support is available.

* Streets now end with a butt linecap rather than a rounded linecap.  If you
prefer a rounded linecap you can just change the relevant style attributes
in the rules file.

* A new attribute on the rule element enables the elements to which the rule
applies to be specificed (e="node|segment|way|area").  This improves
performance and provides greater control.

* <rule k="foo" v="*"> allows a rule to be applied to all elements that have
a key of foo with any value

* <rule k="*" v="foo" > allows a rule to be applied to all elements that
have any key with a value of foo

* The e, k and v attributes can now take a list of possible values (eg
k="highway|class" v="primary|major")

*  Nodes, segments and ways that have a tag with a key that starts with svg:
will have that tag value applied to the corresponding rendered element.  So
for example, a way with a tag like svg:font-style=italic would result in the
text on that way being rendered in italic.  This is not an ideal solution as
its not a good idea to put rendering information in the database, but it
does provide a way to have fine control over the appearance of the output
without too much messing around.

* Street names are now centered half-way along the way to which they belong.

* Street names can now be drawn in the opposite direction along a way by
specifying the tag name_direction=-1 on a segment or way.

* Ways are now rendered using paths rather than as a series of segments.
This should improve performance and reduce the size of the .svg file

* Various bug fixes to enable the generated svg to be viewed in tools like
Inkscape, etc.


The rules file has been updated to take advantage of the above changes.
Other notable changes include:
* Symbols for petrol station, golf course and gate
* Better looking one-way markers
* Some styles for areas (park, parking, water, land)
* A set of rules that overlay JOSM style nodes, segments and ways over the
top of the rendered ways (for debugging and identifying segments that go in
the wrong direction)
* A rule for highway=steps

Enjoy
Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20060708/fe24cc12/attachment.html>


More information about the talk mailing list