[OSM-dev] Osmarender - addclass problem

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


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

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>
    <rule e="way" k="highway" v="primary">
        <line class='highway-primary' />
    </rule>
</addclass>

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:
http://www.informationfreeway.org/?lat=51.46575646757731&lon=-0.29377692535288097&user=80n&zoom=17&layers=0B00F00

Any ideas about how to fix this?

Etienne
-------------- 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