cityImage.identify_regions_primal#

cityImage.identify_regions_primal(graph, nodes_gdf, weight=None)[source]#

It identifies regions in the street network, using the primal graph representation. The modularity optimisation technique is used to identify urban regions.

Parameters:
  • graph (Networkx.Graph) – The primal graph of an urban area.

  • nodes_gdf (Point GeoDataFrame) – The nodes (junctions) GeoDataFrame.

Returns:

regions – A dictionary where to each nodeID (key) corresponds a region code (value).

Return type:

dict