High-level functions¶
Graph builders¶
The high-level builders download OpenStreetMap data, normalize it into the
UrbanGraph data model, estimate a local metric CRS, and compute standard edge
weights:
length_meterEdge geometry length in meters.
time_minTraversal time in minutes. For walk graphs this is based on
walk_speed; for drive graphs it is based on road class and speed tags; for public transport it is based on the activeTransportRegistry.
Most examples use osm_id=1114252 and can be run directly from the notebooks.
See Build transport graphs for end-to-end examples of all builders.
Drive and walk graphs¶
Use get_drive_graph() for car-accessible street networks and
get_walk_graph() for pedestrian networks. Both functions support:
simplifyMerge raw OSM way segments into longer graph edges. Use
Falsewhen the full per-segment topology is required.clip_by_territoryClip edge geometries to the exact territory boundary before graph assembly.
keep_largest_subgraphRemove disconnected fragments. Directed graphs use the largest strongly connected component by default.
The Build transport graphs notebook shows simplify=True and
simplify=False side by side and highlights edges affected by clipping.
Public-transport and intermodal graphs¶
Use get_public_transport_graph() to build bus, tram, trolleybus, subway,
or train graphs. Pass transport_types to restrict modes and
transport_registry to customize time calculation.
Use join_pt_walk_graph() when you already have public-transport and walk
graphs. Use get_intermodal_graph() to build both networks and join them in
one call. Public-transport platform-like nodes are projected to nearby walk
edges, optionally creating link edges.
See Build transport graphs for intermodal construction and Objects, nearest nodes, and graph projection for the lower-level projection workflow used during joining.
Build a drivable UrbanGraph from OpenStreetMap within a given territory. |
|
Build a pedestrian UrbanGraph from OpenStreetMap within a given territory. |
|
Build a directed public-transport graph for one or multiple transport modes within a territory. |
|
Build an intermodal (PT+walking) |
|
Join public-transport and pedestrian |