Class TriangulatorPoints

Source
Expand description

Class for triangulating points from GeoJSON features. It provides methods to convert different geometry types into point meshes.

Constructors§

§

new TriangulatorPoints(): TriangulatorPoints

Methods§

Source§

buildMesh(
    geojson: FeatureCollection,
    origin: number[],
): [ILayerGeometry[], ILayerComponent[]]

Builds a mesh from GeoJSON features representing points.

Source§

multiPointToMesh(
    feature: Feature,
    origin: number[],
): { flatCoords: number[]; flatIds: number[] }[]

Converts a MultiPoint feature to a mesh representation.

Source§

pointToMesh(
    feature: Feature,
    origin: number[],
): { flatCoords: number[]; flatIds: number[] }[]

Converts a Point feature to a mesh representation.

Source§

sampleCircle(
    centerX: number,
    centerY: number,
    radius: number,
    numPoints: number,
): [number, number][]

Samples points on a circle.