[OSM-dev] Creating 3-d connected network from ways + layer tag

Ben Supnik bsupnik at xsquawkbox.net
Wed Jul 29 20:26:21 BST 2009


Hi Y'all,

I am trying to build an algorithm to produce correctly layered, 
correctly connected road networks from OSM ways + the layer tag.

There are a few "easy" cases:

- When two ways cross laterally but have different layers and have no 
node at the intersection, clearly they do not connect in space, and the 
layer of each of the four partial ways at the intersection point is clear.

- When two (and only two) ways end at a common node, and the ways have 
different layers, it's probably a safe bet to say that this is where the 
layers transition and the two ways should connect.  (E.g. a way with 
layer=1 and a way with layer=0 form a highway that has a bridge...this 
junction is where the bridge "hits the ground".

There are two cases I am wondering about though:

- Two ways cross and have different layers, but a common node exists at 
the crossing point.

- Three ways come together, two of one layer, and one of another layer.

An example of this last case might be a residential road that is about 
to "bridge" over a highway, but the bridge ends at a T junction to 
another residential road, e.g.

----*=====
     |

(Sorry for the ASCII drawing...)

These two cases seem tricky to me because there may be some cases where 
ways of different layer need to be brought together and some where they 
need to be kept separate.

Does anyone have thoughts (or has anyone implemented) a heuristic to 
decide when two ways need to be put into the same layer at a given node?

Thanks!
Ben

-- 
Scenery Home Page: http://scenery.x-plane.com/
Scenery blog: http://xplanescenery.blogspot.com/
Plugin SDK: http://www.xsquawkbox.net/xpsdk/
X-Plane Wiki: http://wiki.x-plane.com/
Scenery mailing list: x-plane-scenery at yahoogroups.com
Developer mailing list: x-plane-dev at yahoogroups.com




More information about the dev mailing list