cityImage.graph_fromGDF#
- cityImage.graph_fromGDF(nodes_gdf, edges_gdf, nodeID='nodeID')[source]#
From two GeoDataFrames (nodes and edges), it creates a NetworkX undirected Graph.
- Parameters:
nodes_gdf (Point GeoDataFrame) – The nodes (junctions) GeoDataFrame.
edges_gdf (LineString GeoDataFrame) – The street segments GeoDataFrame.
nodeID (str) – Column name that indicates the node identifier column (if different from “nodeID”).
- Returns:
G – The undirected street network graph.
- Return type:
NetworkX.Graph