OpenStreetMap

Bridges

Posted by Dion Dock on 23 December 2009 in English (English)

I've spent a lot of time adding bridges to the map.

Bridges are important map features since
* They help with routing because it's clear that roads don't intersect.
* They give an idea of how the land appears.
* They explain why there aren't more connections between roads.

That said, I've learned a few things about bridges in OSM.

They are somewhat unusual in they take two tags, bridge=yes and layer=N, where N is 1-5. At first, I thought this was redundant, going as far as to remove layer=1 tags. After all, a bridge implies a higher layer. However, that's not how OSM works.

The layer tag isn't always important for Mapnik to render a good looking map. It seems to understand that a bridge goes above other ways. However, Osmarender needs that layer=1 tag because it gives a priority to each highway= tag. So, for example, a highway=tertiary,bridge=yes way is overwritten by a highway=motorway way. Adding the layer=1 tag to the bridge makes it render properly in both renderers.

So view your favorite area with Osmarender and look for bogus bridges.

Comment from marscot on 23 December 2009 at 21:29

I also add lit=yes or no and source=

Hide this comment

Comment from Hjart on 23 December 2009 at 22:48

I tag rivers and streams layer=-1 so I won't have to tag the bridges going over them layer=1

Hide this comment

Comment from lyx on 23 December 2009 at 22:56

layer -1 is supposed to mean "underground". A stream tagged as layer -1 is not rendered in areas where landuse is defined, as far as I remember. So its better not to do that.

Hide this comment

Comment from Hjart on 24 December 2009 at 00:04

In Ribe, Denmark, where I live, there's a river running through a landuse=residential. It's rendered fine in both Mapnik and Osmarender. The river was tagged layer=-1 when I first found OSM 10 days ago.

Hide this comment

Comment from lyx on 24 December 2009 at 00:30

@Hjart: So apparently renderers work around it nowadays. I'ld suggest to don't do it anyways, because the definition of layer -1 is "below natural ground level". For a description ans discussion of the layer tag, see http://wiki.openstreetmap.org/wiki/Key:layer and the associated discussion page.

Hide this comment

Comment from _FrnchFrgg_ on 24 December 2009 at 13:17

Note that there are places where you can find a brige above another bridge, there "level" makes full sense.

Hide this comment

Comment from seav on 24 December 2009 at 15:55

@lyx, no, layer=-1 does not mean underground. It simply means that a feature is below those nearby with layer=0 to layer=5. The fact that the default is layer=0 and is used for the vast majority of features that lie flat on the ground is just a happy accident.

Hide this comment

Comment from RussNelson on 25 December 2009 at 13:10

technically speaking, aren't all rivers below ground level? The ones which aren't would be impoundments behind a dam, and thus a lake.

Hide this comment

Comment from rorym on 25 December 2009 at 20:15

Yes, technically you shouldn't have to add the layer tag to a bridge. In theory one could deduce later on that the bridge is above something else. However the OSM convention is to include the layer tag.

Hide this comment

Comment from JeffB on 26 December 2009 at 05:19

As _FrnchFrgg_ says, there are plenty of places with multiple layers of bridges. In fact, Bangkok's road system looks like it was designed to show off the layer tag to its best advantage.

Hide this comment

Leave a comment

Parsed with Markdown

  • Headings

    # Heading
    ## Subheading

  • Unordered list

    * First item
    * Second item

  • Ordered list

    1. First item
    2. Second item

  • Link

    [Text](URL)
  • Image

    ![Alt text](URL)

Login to leave a comment