openworld_radio_twin.providers.cityjson#

CityJSON surface decoding without flattening roofs or filling courtyard holes.

Functions

geometry_surfaces(geometry)

Yield rings and matching semantic type at the CityJSON nesting depth.

triangulate_surface(vertices, rings, *[, ...])

Constrained triangulation in the face plane, keeping original vertices/winding.

openworld_radio_twin.providers.cityjson.geometry_surfaces(geometry)[source]#

Yield rings and matching semantic type at the CityJSON nesting depth.

Return type:

Iterator[tuple[list[list[int]], str]]

openworld_radio_twin.providers.cityjson.triangulate_surface(vertices, rings, *, planarity_tolerance_m=0.05)[source]#

Constrained triangulation in the face plane, keeping original vertices/winding.

No synthetic roof height, vertex snapping, convex hull or fan triangulation is used. Collinear zero-area faces produce no triangles. Non-planar, self-intersecting or otherwise invalid faces are rejected for reporting.

Return type:

list[tuple[int, int, int]]