cityImage.get_buildings_fromOSM#

cityImage.get_buildings_fromOSM(place, download_method, epsg=None, distance=1000)[source]#

The function downloads and cleans building footprint geometries and create a buildings GeoDataFrames for the area of interest. The function exploits OSMNx functions for downloading the data as well as for projecting it. The land use classification for each building is extracted. Only relevant columns are kept.

Parameters:
  • place (str, tuple, Shapely Polygon) – Name of cities or areas in OSM: - when using “distance_from_point” please provide a (lat, lon) tuple to create the bounding box around it; - when using “distance_from_address” provide an existing OSM address; - when using “OSMplace” provide an OSM place name. The query must be geocodable and OSM must have polygon boundaries for the geocode result. - when using “polygon” please provide a Shapely Polygon in unprojected latitude-longitude degrees (EPSG:4326) CRS;

  • download_method (str, {"distance_from_address", "distance_from_point", "OSMplace", "polygon"}) – It indicates the method that should be used for downloading the data.

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

  • distance (float) – Used when download_method == “distance from address” or == “distance from point”.

Returns:

buildings_gdf – The buildings GeoDataFrame.

Return type:

Polygon GeoDataFrame