cityImage.amend_nodes_membership#
- cityImage.amend_nodes_membership(nodes_gdf, edges_gdf, column, min_size_district=10)[source]#
Amend the membership of nodes to districts based on connectivity and minimum district size.
- Parameters:
nodes_gdf (Point GeoDataFrame) – The nodes (junctions) GeoDataFrame.
edges_gdf (LineString GeoDataFrame) – The street segments GeoDataFrame.
column (str) – The name of the column containing the district identifier.
min_size_district (int) – The minimum size (number of nodes) required for a district to be considered valid. Default is 10.
- Returns:
nodes_gdf – The updated nodes GeoDataFrame with amended district memberships.
- Return type:
GeoDataFrame