cityImage.polygon_2d_to_3d#

cityImage.polygon_2d_to_3d(building_polygon, base, height, extrude_from_sealevel=True, height_relative_to_ground=False)[source]#

Extrude a 2D building polygon into a 3D PyVista solid.

Parameters:
  • building_polygon (shapely.geometry.Polygon) – Building footprint to extrude.

  • base (float) – Base elevation of the building.

  • height (float) – Building height or absolute top elevation, depending on height_relative_to_ground and extrude_from_sealevel.

  • extrude_from_sealevel (bool, default True) – If True, extrusion starts from zero. If False, extrusion starts from base.

  • height_relative_to_ground (bool, default False) – If True, height is interpreted as height above base. If False, height is interpreted as absolute height above sea level when appropriate.

Returns:

Extruded 3D building solid.

Return type:

pyvista.PolyData