cityImage.dual_gdf#
- cityImage.dual_gdf(nodes_gdf, edges_gdf, epsg, oneway=False, angle=None)[source]#
It creates two dataframes that are later exploited to generate the dual graph of a street network. The nodes_dual gdf contains edges centroids; the edges_dual gdf, instead, contains links between the street segment centroids. Those dual edges link real street segments that share a junction. The centroids are stored with the original edge edgeID, while the dual edges are associated with several attributes computed on the original street segments (distance between centroids, deflection angle).
- Parameters:
nodes_gdf (Point GeoDataFrame) – The nodes (junctions) GeoDataFrame.
edges_gdf (LineString GeoDataFrame) – The street segments GeoDataFrame.
epsg (int) – Epsg of the area considered
oneway (boolean) – When true, the function takes into account the direction and therefore it may ignore certain links whereby vehichular movement is not allowed in a certain direction.
angle (string {'degree', 'radians'}) – It indicates how to express the angle of deflection.
- Returns:
nodes_dual, edges_dual – The dual nodes and edges GeoDataFrames.
- Return type:
tuple of GeoDataFrames