cityImage.get_network_fromGDF#

cityImage.get_network_fromGDF(edges_gdf, epsg, dict_columns={}, other_columns=[])[source]#

The function loads a vector lines shapefile from a given LineString GeoDataFrame, along with the epsg coordinate code. It creates two GeoDataFrame, one for street junctions (nodes) and one for street segments (edges). The GeoDataFrames are built assuming a planar undirected graph.

Parameters:
  • path (str) – the local path where the .shp file is stored.

  • epsg (int) – Epsg of the area considered .

  • dict_columns (dict) – It should be structured as: {“highway”: “roadType_field”, “oneway”: “direction_field”, “lanes”: “nr. lanes”, “maxspeed”: “speed_field”, “name”: “name_field”}. Replace the items with the field names in the input data (if the relative attributes are relevant and existing).

  • other_columns (list) – Other columns to be preserved in the edges_gdf GeoDataFrame.

Returns:

nodes_gdf, edges_gdf – The junction and street segment GeoDataFrames.

Return type:

tuple