cityImage.land_use_from_other_gdf#

cityImage.land_use_from_other_gdf(buildings_gdf, other_gdf, new_land_use_field, land_use_field)[source]#

It assigns land-use attributes to buildings in a buildings GeoDataFrame, looking for possible matches in “other_gdf”, a Polygon or Point GeoDataFrame Polygon: Possible matches here means the buildings in “other_gdf” whose area of interesection with the examined building (y), covers at least 60% of the building’s (y) area. The best match is chosen.

Point: Possible matches are identified when points lie within the buildings_gdf polygons. The most represented category is chosen when more than one points lies inside a building footprint.

Parameters:
  • buildings_gdf (Polygon GeoDataFrame) –

    The buildings GeoDataFrame. other_gdf: Point or Polygon GeoDataFrame

    The GeoDataFrame wherein looking for land_use attributes.

  • new_land_use_field (str) – Name of the column in buildings_gdf to which assign the land_use descriptor.

  • land_use_field (str) – Name of the column in other_gdf wherein the land_use attribute is stored.

Returns:

buildings_gdf – The updated buildings’ GeoDataFrame.

Return type:

Polygon GeoDataFrame