Why key=layer and key=level?

Why do osm have both layer and level? Isn’t enough with one of these?

layer is used to define the vertical stacking order of overlapping map elements (like bridges or tunnels) to avoid visual confusion in rendering, while level indicates the physical floor within a building, crucial for indoor mapping. Or how would you indicate when one object is above another even though it is on the same floor?

8 Likes

Different layers?

2 Likes

All you have to know to understand the difference you will find at Key:layer and Key:level.

But most importantly, these tags can even be combined!
:wink:

1 Like

Think of a passenger lift in a multi-storey building or in a train station. How do you use layer to indicate which floors this lift serves?

If the wiki had told me what I asked for, I haven’t post the question here.

1 Like

If it’s important to show on what floor something is (same number as on the lift buttons), then maybe level is correct to use.

As I never do any indoor mapping, maybe I misunderstand something. Never mind.

Another difference between the two is that layer is in a sense purely fictional and highly localised.
layer=1 can mean wildly different actual vertical difference, even over just a few meters. To cite the article:

The vertical ordering established by the layer values is valid exactly only in the precise location (not marked by a node) where the ways cross or objects overlap.

On the other hand, level directly references otg, real floors, which sometimes don’t even have a number. So there is some objective reference as to what level=1 means.

4 Likes

I do agree that the wiki answers the how here but not the why.

Now, things clarifyed, could you add this/the why into the wiki pages please?

that for @msiipola or somebody 3kse, I find both pages highly confusing and do not feel confident to edit them, actually. I never use these tags but for bridges so know little about these tags in practice.