create_building
Creates a new building with selectable level of detail (LoD 0/1/2) and adds it directly to the active CityJSON/CityGML dataset. Use take_snapshot() before creating and save_dataset() to save.
Instructions
Erstellt ein neues Gebäude mit wählbarem Detaillierungsgrad (LoD 0/1/2).
LoD: 0=2D-Grundfläche | 1=3D-Quader | 2=3D mit Dachgeometrie (Standard)
Das Gebäude wird direkt zum aktiven Dataset hinzugefügt (Single Source of Truth). Verwende take_snapshot() vor dem Erstellen und save_dataset() zum Speichern.
Args: id: Eindeutige Gebäude-ID groundsCoordinates: 2D-Grundriss als Liste von Koordinaten [[x1,y1], [x2,y2], ..., [x1,y1]] groundSurfaceHeight: Bodenhöhe in Metern geometryHeight: Gebäudehöhe in Metern (erforderlich für LoD 1+2) roofType: Dachtyp (für LoD 2): "1000"=Flach, "1010"=Pult, "1020"=Pult versetzt, "1030"=Sattel, "1040"=Walm, "1070"=Zelt roofHeight: Dachhöhe in Metern (für LoD 2, außer "1000") roofOrientation: Dachausrichtung als Koordinaten-Index (für "1010","1020","1030") lod: Detaillierungsgrad 0-2 (Standard: 2) isRoofEdge: Für LoD 0, ob Koordinaten Dachkante sind (Standard: False)
Returns: dict: Das erstellte Gebäude mit allen Attributen und Bounding Box
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| lod | No | ||
| roofType | No | ||
| isRoofEdge | No | ||
| roofHeight | No | ||
| geometryHeight | No | ||
| roofOrientation | No | ||
| groundsCoordinates | Yes | ||
| groundSurfaceHeight | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||