cityImage.get_buildings_fromFile#

cityImage.get_buildings_fromFile(path, epsg, case_study_area=None, distance_from_center=1000, height_field=None, base_field=None, land_use_field=None)[source]#

The function take a building footprint .shp or .gpkg, returns two GDFs of buildings: the case-study area, plus a larger area containing other buildings, called “obstructions” (for analyses which include adjacent buildings). Otherise, the user can provide a “distance from center” value; in this case, the buildings_gdf are extracted by selecting buildings within a buffer from the center, with a radius equal to the distance_from_center value. If none are passed, the buildings_gdf and the obstructions_gdf will be the same. Additionally, provide the fields containing height, base elevation, and land use information.

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

  • epsg (int) – Epsg of the area considered; if None OSMNx is used for the projection.

  • case_study_area (Polygon) – The Polygon to be use for clipping and identifying the case-study area, within the input .shp. If not available, use “distance_from_center”.

  • distance_from_center (float) – So to identify the case-study area on the basis of distance from the center of the input .shp.

  • height_field (str) – Height and base elevation fields name in the original data-source.

  • base_field (str) – Height and base elevation fields name in the original data-source.

  • land_use_field (str) – Field that describes the land use of the buildings.

Returns:

buildings_gdf, obstructions_gdf – The buildings and the obstructions GeoDataFrames.

Return type:

tuple of GeoDataFrames