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_groundandextrude_from_sealevel.extrude_from_sealevel (bool, default True) – If
True, extrusion starts from zero. IfFalse, extrusion starts frombase.height_relative_to_ground (bool, default False) – If
True,heightis interpreted as height abovebase. IfFalse,heightis interpreted as absolute height above sea level when appropriate.
- Returns:
Extruded 3D building solid.
- Return type:
pyvista.PolyData