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 line_detect_epsilon
property lod
property lod13_step_height
property override_with_floor_elevation
property plane_detect_epsilon
property plane_detect_k
property plane_detect_min_points
property plane_detect_normal_angle
property thres_alpha
property thres_reg_line_dist
property thres_reg_line_ext
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 0x7f024f6c0c30>) -> 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 0x7f024f6b68f0>) -> 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