Matrices

Shortest-path workflows

IduEdu shortest-path helpers work on UrbanGraph objects and reuse the graph adjacency cache when possible. Distances use the units of the selected edge weight:

time_min

Travel time in minutes.

length_meter

Network distance in meters.

See Shortest paths and OD matrices for runnable examples of every function listed below.

Choosing a helper

Use single_source_dijkstra_path_length() when one source node should be expanded to reachable graph nodes.

Use multi_source_dijkstra_path_length() when several sources should act as one combined source set and each reachable node needs only the best distance to the closest source.

Use multi_source_dijkstra_nearest_source() when the closest source id is needed together with the distance.

Use dijkstra_path_length_parallel() when every source needs its own sparse distance row, for example for per-origin accessibility profiles.

Use od_matrix() when you need an origin-destination table between two sets of graph nodes or object tables.

GeoDataFrame inputs

Several helpers accept GeoDataFrames through gdf_sources, gdf_origins, or gdf_destinations. If the table already contains graph_node_id (or the column configured through graph_node_column), that mapping is used directly. Otherwise objects are matched to nearest graph nodes. For object-to-edge projection before OD calculations, see Objects, nearest nodes, and graph projection.

single_source_dijkstra_path_length

Compute shortest-path distances from one source node to graph nodes.

multi_source_dijkstra_path_length

Compute distance from the nearest source to each reachable graph node.

multi_source_dijkstra_nearest_source

Find the nearest source and its distance for each reachable graph node.

dijkstra_path_length_parallel

Run independent Dijkstra searches for each source.

od_matrix

Compute an origin-destination shortest-path matrix on an UrbanGraph.