Hi all,
I’m building a game that procedurally generates underground pedestrian networks (Toronto PATH, Montreal RESO, etc.) from OSM data. The geometry generation is working well (corridors, shops, stairs, station enclosures) but I’m running into some challenges with level assignments and connectivity that I’d love community input on.
What works:
-
Extracting corridors, platforms, stairs/escalators from
highway=footway+tunnel=yes/indoor=yes -
Using
leveltags to separate floors -
Placing shops from
shop/amenitynodes withleveltags (only kind of works because shops do not have structure footprint) -
Identifying subway stations from
station=subwaynodes
Screenshot:
-
High overhead view of the generated network
-
Pink boxes = stairs to surface, grey boxes = elevators/underground stairs. Ceilings removed for debug visibility.
I know image looks bad, because of the challenges below:
-
Inconsistent level tagging on subway platforms. Some platforms are tagged
level=-2(way 298852576, way 298852577), otherslevel=-1(way 34542613, way 63032409), and many have no level tag at all (way 684038824 “Yonge Street, King Station”, way 683577944 “University Avenue, St. Andrew Station”). Should I assume subway platforms are always one level below street, or respect the tagged level even when it creates disconnected islands? -
Half levels (level=-0.5). These appear as mezzanines in the PATH data (way 34121534, way 352702706). I’m currently snapping them to the nearest integer level. Is there a convention for how these should be interpreted, or are they genuinely distinct floors?
-
Disconnected fragments. Many underground
highway=serviceways appear under buildings (parking garages, condo basements) but aren’t connected to the main pedestrian network (e.g. way 172728953). Is there a reliable way to distinguish “part of PATH” from “building basement service corridor” beyond checking PATH relation membership? -
Station to corridor connectivity. Station platforms often appear as isolated islands with no explicit corridor linking them to the pedestrian network. For example, King Station (node 34710076) has platform ways (way 684038824) but no mapped corridor connecting the platform to the PATH. Similarly St. Andrew (node 34710073, way 683577944). The connection is implied by proximity. Is there a tagging pattern I should look for, or is this a known mapping gap?
Assumptions I’m currently making:
-
Subway stations sit at level -1 (same as pedestrian network)
-
5m floor to floor spacing (4m ceiling + 1m slab)
-
Escalators dropped for now (stairs only for vertical connections)
-
Service corridors not in the PATH relation are filtered out
If anyone has experience mapping or consuming underground networks, I’d appreciate any tips on tagging conventions, common data gaps, or better heuristics for level assignment.
Thanks!
