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

Richard Z. ricoz.osm at gmail.com
Tue Apr 22 14:40:13 UTC 2014

On Mon, Apr 21, 2014 at 09:53:21PM +0100, Chris Hill wrote:
> On 21/04/14 21:20, Martin Koppenhoefer wrote:
> >
> >2014-04-21 20:48 GMT+02:00 Richard Z. <ricoz.osm at gmail.com
> ><mailto:ricoz.osm at gmail.com>>:
> >
> >    > Without any additional tags like "tunnel=*" or "covered=*", a
> >    > "layer=-1" river shouldn't be rendered differently than a
> >    "layer=1" or
> >    > even in the absence of any "layer" tag. This is a bug in OsmAnd. You
> >
> >    except for the the very frequent case when the river with a layer=-1
> >    goes through a landuse=* area with a layer=0.
> >
> >
> >
> >+1, as soon as there is any other object on a different layer, be
> >it landuse, a place area or something else, with the lower layer
> >tag you are excluding the river from this feature and putting it
> >below.
> Layer is a hint to the renderer. The item with the lowest layer
> value is drawn first, then the next highest and so on. In the
> example of where a road crosses a railway on a bridge, the railway
> (often default layer=0) is drawn, then the road (often layer=1) is
> drawn,casing first then inner and any part that crosses the railway
> obscures that part of the railway.

we don't have a bridge here.

> What you are saying is that the river (layer=-1) is drawn then the
> landuse (layer=0) is drawn over it, obscuring the river. This is
> clearly not intended and not what actually happens in Mapnik
> renders, which is much smarter than that.

in other words mapnik is applying artificial intelligence trying to 
work around obvious errors in OSM data.
> Layer tag is a *hint* to the renderer, nothing more.

the wiki page says 
The layer=* tag is one of several methods used to describe vertical 
relationships between crossing or overlapping features.

Not a single word of a "hint to the renderer" anywhere in the article.

If the definition of "key:layer" would become "a hint to the renderer" we 
could clearly abolish it. 
We don't tag for the renderer means ***we do not need hints for the renderer***.

Especially not bad ones.

And how much worth is a "hint to the renderer" if the renderer can only work 
by deliberately ignoring the hint?

Now what is that key:layer anyway? Given that nobody knows or cares how it 
works does it do more good than harm? Do we need it at all?
Or should we make a fresh start with something well defined and deprecate
this mess?


More information about the Tagging mailing list