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

Richard Z. ricoz.osm at gmail.com
Fri Mar 14 19:09:04 UTC 2014


On Fri, Mar 14, 2014 at 04:36:26PM +0100, Pieren wrote:
> On Fri, Mar 14, 2014 at 4:15 PM, Jaakko Helleranta.com <jaakko at helleranta.com>
> 
> > At least OsmAnd renders all waterways with layer=-1 with
> > dashed casing, as if they were underground, which to me makes sense
> 
> That's clearly a bug. Waterways underground is specified by "tunnel=*"

this is not a bug. Rivers do not flow through thin air but through areas
which are tagged as landuse=forest, landuse=meadow or some other.

So what happens if you have a river with a layer=-1 going through
a landuse=forest with a layer=0? Quite clearly the river should be
hidden under the forest and my guess is 5 out of 10 renderers do 
exactly that.

Mapnik is way too fault tolerant and works around this obvious breakage.
Maybe it should be changed to be less fault tolerant.

> > So, again : why tag things with with layer= tag when they are essentially on
> > ground level = not above or below other data (or at least natural objects
> > that might be mapped one day *) ? Am I missing something here?
> 
> Real case from real world : a deep ditch where the stream is not
> "underground" but below the "ground" level, is crossing a village
> where we have 10 bridges. Either you add 10 times "layer=1" on the
> bridges or you add 1 time "layer=-1" on the stream.

This is one rare example where it may at first sight appear to be of 
some use. 
However as it is a rare example it will cause more work in the end than 
if you do it the normal way. Nobody expects it being done like this so 
it will cause more thinking for anybody trying to change something 
there.
Everyone who tries to edit it must download the complete data along the 
way that is tagged layer=-1 and understand all crossings there. 
What happens if it is a bigger village or a small town? This does not 
scale well.

This one rare case where it might be of theoretical use is in my opinion
far outweighed by the disadvantages of allowing it:

* prevents validators from doing some very easy and useful checks
* very many people use layer=-1 for waterways incorrectly and taking your
  idea into account would make it much harder to properly detect and fix 
  such errors

Richard



More information about the Tagging mailing list