cityImage.district_to_nodes_from_edges#
- cityImage.district_to_nodes_from_edges(nodes_gdf, edges_gdf, column)[source]#
It assigns districts’ identifiers to the street junctions (nodes), when the districts are assigned to the street segments (edges), i.e. communities are identified on the dual graph. The attribution is based on Euclidean distance from each node to the closest street segment.
- Parameters:
nodes_gdf (Point GeoDataFrame) – The nodes (junctions) GeoDataFrame.
edges_gdf (LineString GeoDataFrame) – The street segments GeoDataFrame.
column (string) – The name of the column containing the district identifier.
- Returns:
nodes_gdf – The updated street junctions GeoDataFrame.
- Return type:
Point GeoDataFrame