API Reference Python

The roofer python API allows you to use the roofer library from Python. Most notably it provides a reconstruct() function that takes a pointcloud and a roofprint polygon for a single building object and returns a reconstructed building model mesh.

Note

Because roofer internally uses floats to represent coordinates, it is advised to translate your data to the origin prior to calling reconstruct() to prevent loss of precision.

See this script for a simple example of how to use the Python bindings.

class roofer.ReconstructionConfig
property clip_ground
property complexity_factor
property floor_elevation
is_valid(self: roofer.ReconstructionConfig) bool
property lod
property lod13_step_height
property override_with_floor_elevation
roofer.reconstruct(*args, **kwargs)

Overloaded function.

  1. reconstruct(points_roof: list[Annotated[list[float], FixedSize(3)]], points_ground: list[Annotated[list[float], FixedSize(3)]], footprint: list[list[Annotated[list[float], FixedSize(3)]]], cfg: roofer.ReconstructionConfig = <roofer.ReconstructionConfig object at 0x7f30bd18f330>) -> list[list[list[list[Annotated[list[float], FixedSize(3)]]]]]

Reconstruct a single instance of a building from a point cloud with ground points

  1. reconstruct(points_roof: list[Annotated[list[float], FixedSize(3)]], footprint: list[list[Annotated[list[float], FixedSize(3)]]], cfg: roofer.ReconstructionConfig = <roofer.ReconstructionConfig object at 0x7f30bd18f4f0>) -> list[list[list[list[Annotated[list[float], FixedSize(3)]]]]]

Reconstruct a single instance of a building from a point cloud without ground points

roofer.triangulate_mesh(mesh: list[list[list[Annotated[list[float], FixedSize(3)]]]]) tuple[list[Annotated[list[float], FixedSize(3)]], list[Annotated[list[int], FixedSize(3)]]]

Triangulate a mesh