flywave-terrain-datasource.groundmodificationmanager.addmodification
Home > @flywave/flywave-terrain-datasource > GroundModificationManager > addModification
GroundModificationManager.addModification() method
Adds a new ground modification polygon
This method creates a new ground modification with the specified parameters and adds it to the manager. It performs validation on the input parameters and updates the spatial index.
Signature:
addModification(type: GroundModificationType, boundary: GeoBox | GeoPolygon | GeoLineString, slopeWidth?: number, depthOrHeight?: number): GroundModification;
Parameters
Parameter | Type | Description |
|---|---|---|
type | Type of modification ("excavation" or "elevation") | |
boundary | GeoBox | GeoPolygon | GeoLineString | GeoBox, GeoPolygon, or GeoLineString defining the boundary |
slopeWidth | number | (Optional) Optional width of the slope for the modification |
depthOrHeight | number | (Optional) Positive number representing depth/height in meters |
Returns:
[GroundModification](./flywave-terrain-datasource.groundmodification.md)
The created ground modification
## Exceptions
Error if input is invalid