Skip to main content

flywave-terrain-datasource.serializedgroundmodificationpolygon

Home > @flywave/flywave-terrain-datasource > SerializedGroundModificationPolygon

SerializedGroundModificationPolygon interface

Serialized format for worker communication and storage

This format is optimized for transmission between web workers and persistent storage. It uses JSON-compatible types to ensure efficient serialization and deserialization.

Signature:

export interface SerializedGroundModificationPolygon 

Properties

Property

Modifiers

Type

Description

boundingBox

GeoBoxArray

Bounding box of the polygon in array format [west, south, east, north]

Provides a quick spatial index for the modification without requiring complex geometric calculations.

depthOrHeight?

number

(Optional) Depth or height value for the modification (optional)

When present, defines the vertical extent of the modification in meters. Positive values typically represent elevation, negative values excavation.

geoArea

GeoPointLike[] | GeoBoxJSON | { type: "Polygon"; coordinates: GeoPointLike[]; } | { type: "LineString"; coordinates: GeoPointLike[]; width?: number; }

Geographical area definition in various formats

Can be a polygon, line string with width, bounding box, or array of points. The format varies depending on the type of geographic area being defined.

id

string

Unique identifier for the polygon

Used to uniquely identify this modification across the system.

slopeWidth?

number

(Optional) Slope width for the modification (optional)

When present, defines the width of the slope transition zone around the modification area. This creates smoother transitions between modified and unmodified terrain.

type

GroundModificationType

Type of ground modification to apply

Defines how the terrain should be modified using vertex source and height operation parameters.