spatial-monorepo / core/src / inferWallGeometry
Function: inferWallGeometry()
inferWallGeometry(
levelPolygon,unitPolygons):MultiPolygon
Defined in: packages/core/src/layers/wall-inference.ts:49
Infer wall geometry for a floor level.
Algorithm:
- Convert the level polygon to polygon-clipping format.
- Union all unit polygons.
- Difference: level − union(units) = wall area.
- Return result as GeoJSON MultiPolygon.
Parameters
levelPolygon
Polygon | MultiPolygon
The bounding polygon of the floor level.
unitPolygons
(Polygon | MultiPolygon)[]
Unit (room) polygons to subtract from the level.
Returns
MultiPolygon
GeoJSON MultiPolygon representing the wall geometry.
