[Tagging] layer=-1, rivers, bridges and tunnels

Peter Wendorff wendorff at uni-paderborn.de
Sat Mar 15 19:31:41 UTC 2014

Am 15.03.2014 19:19, schrieb Fernando Trebien:
> Here are a few arguable reasons to split the waterway and tag it with layer=-1:
> 1. Bridges may come in pairs for dual carriageways. In this case, it's
> a single layer tag for the waterway versus 2 layer tags for the
> bridges. This may happen many times in a row. In this case, it makes
> sense to split the waterway at 1 point (dividing into "urban" and "not
> urban" parts) and tag the whole urban part with layer=-1. That's the
> case in my hometown (54 tags, one for every bridge vs 1 tag only + 1
> split waterway), see here towards the East:
> http://www.openstreetmap.org/#map=17/-30.04781/-51.22689
On the other hand you don't have to split anything if you put the layer
tag on the bridges because the bridge is already a separate object.

And even bridges span several parallel osm-ways often: cyclepaths
footpaths, streets, railway lines... along the waterway, one sided or

> 2. If you split only near the bridges, the name of the waterway will
> be rendered between the bridges, which is the optimal position. (But
> this "could" be considered mapping for the renderer.)
This is heavily mapping for the renderer. A good and powerful renderer would
a) join ways with the same name but different "detail" tags for layer
b) place the label where no bridge or way above the tunnel is in
conflict regarding the space on the canvas.

This may not be the case out of performance reasons for an online
rendering system like the mapnik stylesheet on osm.org, but that's
another issue.

> Situation 1 happens in many other cities across the world, and if you
> tag the bridge as layer=1, you may end up inverting the rendering
> order of highways, leading to this:
> http://www.openstreetmap.org/way/138032009
good point, but I would consider this a bug independent of rendering as
the same may occur on the way below the bridge as well, if there's a
join of that way with another one without a layer tag.x

anyone going to report this as a bug in the stylesheet?


More information about the Tagging mailing list