cityImage.visibility_polygon2d#

cityImage.visibility_polygon2d(building_geometry, obstructions_gdf, obstructions_sindex, max_expansion_distance=600)[source]#

It creates a 2d polygon of visibility around a polygon geometry (e.g. building footprint) and computes its area. This can be considered as a measure of 2d advance visibility. Such a polygon is built by constructing lines around the centroid of the building, breaking them at obstructions and connecting the new formed geometries to get the final polygon. The “max_expansion_distance” parameter indicates up to which distance from the building boundaries the visibility polygon can expand.

Parameters:
  • building_geometry (Polygon) – The building geometry.

  • obstructions_gdf (Polygon GeoDataFrame) – Obstructions GeoDataFrame.

  • obstructions_sindex (Spatial Index) – The spatial index of the obstructions GeoDataFrame.

  • max_expansion_distance (float) – It indicates up to which distance from the building boundaries the 2dvisibility polygon can expand.

Returns:

The area of visibility.

Return type:

float