iduedu.nearest_nodes¶
- iduedu.nearest_nodes(urban_graph, gdf, *, graph_node_column='graph_node_id')[source]¶
Return the nearest graph node id for each input geometry.
- Parameters:
urban_graph (
UrbanGraph) – Graph whosenodes_gdfcontains point geometries.gdf (
GeoDataFrame) – GeoDataFrame with geometries to match to graph nodes.graph_node_column (
str) – Name assigned to the returnedSeries.
- Return type:
- Returns:
Series indexed like
gdfwith nearest node ids as values.- Raises:
TypeError – If
gdfis not a GeoDataFrame.ValueError – If graph or object geometries cannot be matched safely.