cityImage.identify_regions#
- cityImage.identify_regions(dual_graph, edges_gdf, weight=None)[source]#
It identifies regions in the street network, using the dual graph representation. The modularity optimisation technique is used to identify urban regions.
- Parameters:
dual_graph (Networkx.Graph) – The dual graph of an urban area.
edges_gdf (LineString GeoDataFrame) – The (primal) street segments GeoDataFrame.
weight (string) – The edges’ attribute to use when extracting the communities. If None is passed, only the topological relations influence the resulting communities.
- Returns:
regions – A dictionary where to each primal edgeID (key) corresponds a region code (value).
- Return type:
dict