[Tagging] Tunnels and bridges

Martin Vonwald imagic.osm at gmail.com
Fri Feb 1 11:46:14 GMT 2013


2013/2/1 Martin Koppenhoefer <dieterdreist at gmail.com>:
> 2013/2/1 Pieren <pieren3 at gmail.com>:
>> On Fri, Feb 1, 2013 at 11:06 AM, Tobias Knerr <osm at tobias-knerr.de> wrote:
>>> - ways must be split at the beginning and end of the bridge
>> Not necessarily. "layer" can be set on the highway before and after
>> the bridge (if it is done carefully and not interfer with other
>> crossings). What I like in this modeling is that we could avoid
>> splitting if no attribute of the road is affected by the bridge (or
>> tunnel).
>
>
> IMHO we shouldn't "avoid" splitting as it will tend to make our data
> less consistent. Think about ways under the bridge. Also we are
> already splitting the ways for lots of reasons (routes and
> turn_restrictions, changing attributes like maxspeed, surface, width,
> lanes, oneway, lit, etc.), there is really no point in not splitting
> at bridges (IMHO). It would require everyone to do expensive ST_Within
> queries to determine simple stuff like where on the road is a bridge
> and which object is above which.

Correct. Not only would it be more difficult for consumers it would
also be different from the way we tag right now. What I have in mind
is a tagging scheme that starts simple and allows to add more details
while maintaining the original (simple) tagging.

Imagine a bridge as it is mapped now: a OSM-way with bridge=yes and
layer=1 (just an example). The way is split right at both ends of the
bridge, because the tag bridge=yes should only be on the bridge
itself.

Now imagine there is not a single way representing the bridge but two.
One now wants to improve the tagging be indicating that these two ways
are in fact one bridge. This now can be done quite easily but just
adding a way describing the outline of the bridge and tagging it with
man_made=bridge and layer=1. At the intersection of the outline with
the ways those ways should have connecting nodes, because right at
this point the ways - according to the "simple" current tagging scheme
are split so that bridge=yes and layer=1 can be tagged. So we reuse
those nodes and connect them to the new outline. We do NOT have to
change any existing tagging!

Now imagine that this bridge also has a second level. Again we add a
way for the outline, again we tag it with man_made=bridge. So again no
change to the existing ways/tags. As we have two levels now we need
the relation which we use the combine the ways of the two levels (with
different layer tags) and the outline.


I referred only to bridge-related keys in the statements above. Tags
like e.g. name usually have to be adapted but that's just because they
are usually tagged incorrect. Common example: the name tag of the ways
on a bridge contains the name of the bridge instead of the name of the
road. Now we can put the name of the road AND the name of the bridge
where it belongs.


regards,
Martin



More information about the Tagging mailing list