[OSM-dev] Osmarender - addclass problem

80n 80n80n at gmail.com
Wed Jun 20 08:42:17 BST 2007

I've just noticed a possible problem with the <addclass> instruction in

The sequence in which subordinate rules are processed within an <addclass>
instruction are not strictly honoured.  Consider the following example:

<addclass k="oneway" v="1|yes|true" class="oneway">
    <rule e="way" k="highway" v="secondary">
        <line class='highway-secondary' />
    <rule e="way" k="highway" v="primary">
        <line class='highway-primary' />

Normally you would expect all secondary ways to be rendered and then all
primary ways.  However, with the introduction of the <addclass> instruction
the rendering order becomes:

1 one-way secondary
2 one-way primary
3 two-way secondary
4 two-way primary

So when you have a two-way secondary that meets a one-way primary the
rounded end of the secondary road is rendered over the primary rather than
under it.

You can see an extreme example of this here, where lots of residential roads
meet a main road:

Any ideas about how to fix this?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20070620/1abea8dc/attachment.html>

More information about the dev mailing list