[OSM-talk] Bridge relation on way going under?
Tobias Knerr
osm at tobias-knerr.de
Sat May 28 17:46:04 BST 2011
Dave F. wrote:
> http://wiki.openstreetmap.org/wiki/Relations/Proposed/Bridges_and_Tunnels
[...]
> This statement:
>
> "allows both the way(s) crossing the structure /and/ those passing under
> it to be identified (river and most canals bridges only pass /over/ the
> waterway, and using only the Way tag bridge=yes means that intersection
> tests would have to be used to determine the bridges; now we can
> associate the bridges with the waterway as well."
>
> is unclear (to me) as to why it's necessary. Why does an intersection
> test need to be performed; doesn't the 'bridge=' tag define that the two
> crossing ways are separate?
Let's say my application needs to answer, for whatever reason[1], the
question "what ways are below this bridge".
If there is no relation, then this is what the application would do:
* gather at all the ways around the bridge
* find ways that intersect the bridge way, ignoring the third dimension
* check the layer on these ways
-> all ways that intersect the bridge way (in 2D representation!) and
have a lower layer are below the bridge.
With a relation, these calculations would not be necessary. In my
opinion, this is not a reason to use a bridge relation, though. (There
/are/ reasons for using a bridge relation, but this is not one of them.)
-- Tobias Knerr
[1] most programs don't even need to know that. Routers can rely on the
convention that there is no connection between ways without a common
node, and 2D renderers only need the layer. A group of applications
which actually need that information are advanced 3D renderers.
More information about the talk
mailing list