[OSM-talk] Indiscrimate layering

David Earl david at frankieandshadow.com
Sat Dec 20 16:50:09 GMT 2008


On 20/12/2008 16:05, Sven Rautenberg wrote:
> The stream therefore is the natural surface wherever its water flows.
> The bridge is above the water, so it is layer=1. And it is less
> dangerous when just tagging the bridge compared to tagging the whole stream.

I find it is usually the other way round: I am making a stream in virgin 
territory and by setting layer=-1 ways that are added later and don't 
have bridges (more specifically layer=1) applied are still separated OK 
even without explicit bridges (which are sometimes OTT -see below).

Someone who doesn't realise the stream is layer=-1 will still be OK if 
they put in a bridge at layer=1. A renderer that puts a stream at 
layer=-1 underneath a land area at layer=0 is rendering naively (Mapnik 
and Osmarender get this right, I'm guessing because they correctly 
renders all areas before any ways, but they're not so good on two areas 
e.g on natural=marsh being rendered on top of landuse=grass without 
explicit help, even though it is "obvious" to a human).

Lots of major motorways and rail lines aren't properly divided up with 
bridges every few metres to cross minor streams (many of which are in 
practice just glorified pipes under the road) and footways. Yes, they 
should but in practice they don't.

For minor waterways this entirely valid technique generally results in 
better rendering and is no specifically tagging for the renderer - it's 
a perfectly correct method.

Anyway...

- we're free to use whatever method suits us; what the original post was 
about was automatically and anonymously changing data in bulk based on 
an invalid assumption, not trying to justify the way it was tagged 
initially.

- the layer tag is tagging for the renderer in 99% of cases with 
bridges. In nearly all cases a bridge/tunnel tag says "I am above/below" 
automatically and a layer tag should be unnecessary. There are a few 
exceptions, but they are very rare: primarily where a bridge crosses 
exactly over the top of another bridge, where there are more than two 
layers involved (e.g. - and this is the only one I have come across in 
2.5 years mapping - 
http://www.openstreetmap.org/?lat=52.329684&lon=-0.192102&zoom=18&layers=B000FTFTTT 
where the A14 crosses the B1514 which in turn crosses the East Coast 
Main Line railway all at the same point). Had relations been invented 
earlier this case might have been better described using a relation.

And ha! Mapnik gets it wrong anyway! It doesn't continue the bridge 
casement on the A14 where it should even though the topmost bridge is 
marked as layer 2.

- I think I'd argue that layer is redundant in most other cases too. The 
renderer ought to be able to deduce that a lake in a wood is rendered on 
top and an island in a lake is on top, even if there is no multipolygon 
hole in the wood/lake. And the physical nature of the object concerned 
is more important in rendering than its layer - for example, a subway 
railway is rendered on top of a park even though it actually runs 
underneath it, otherwise it would be invisible.

David




More information about the talk mailing list