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

Friedrich Volkmann bsd at volki.at
Mon Mar 24 13:27:16 UTC 2014

On 14.03.2014 15:51, Fernando Trebien wrote:
> This is a small issue that came up recently in Brazil. In my
> understanding, the layer tag has no specific meaning other than to
> specify a rendering order.

That is a common misconception by people who worked with graphics editing
software such as Photoshop and Corel Draw. In these applications, layers are
only used for ordering and grouping of objects. As opposed to that abstract
layer model, we use a pysical layer model in OSM where layer=0 means
ground-level, layer<0 means underground, and layer>0 means above ground-level.

Renderers typically use a different rendering style for underground
features, e.g. dashed  or greyed-out lines, or these features may even be
omitted. The only way how renderers can determine whether a feature is
underground is by looking at the layer tag. tunnel=* and bridge=* do not
necessarily mean that a feature is underground / above ground. There was
even a negative voting on this (a proposal for implying layer=-1 or 1
respectively). And the other way round, not all underground objects are
tunnels or culverts. A tunnel is a way with an entrance on each end. It is
not a tunnel if it has a dead end. And what about POIs and areas? It would
be stupid to tag them as tunnels. The tunnel=* and bridge=* tags do help the
renderers when it comes to the curved bridge and tunnel signatures, but the
dashing can only depend on the layer tag.

> The wiki, however, states that it is wrong
> to tag a whole river with layer=-1. The reason for that, as far as I
> could figure, is because current validators (such as JOSM's or
> KeepRight's) will not issue a warning on a waterway x highway crossing
> when their layers are different, leading some users into tagging the
> river with layer=-1 in order to get rid of warnings about missing
> bridges and tunnels.

The warning is ok, but the big problem with validators is that mappers mess
around with the data without local knowledge, just to shut up the validator.
They connect ways which are not really connected, they insert bridges and
culverts that do not really exist, and so on. Among these so-called "fixes",
the layer=-1 on waterways are relatively harmless, because it is so obvious
that they are wrong. A culvert that has been made up by a sofa mapper is
much more difficult to correct, because you only know when you go there.

> Do you agree that the river can be tagged with layer=-1 as long as
> this value is correct in relation to the layer of other
> nearby/crossing ways?

No, except for underground rivers. They do exist in karst regions...

Friedrich K. Volkmann       http://www.volki.at/
Adr.: Davidgasse 76-80/14/10, 1100 Wien, Austria

More information about the Tagging mailing list