Class: DelaunayTriangulationBuilder

jsts.triangulate.DelaunayTriangulationBuilder

new DelaunayTriangulationBuilder()

A utility class which creates Delaunay Trianglulations from collections of points and extract the resulting triangulation edges or triangles as geometries. Initializes a new DelaunayTriangulationBuilder
Source:

Methods

(static) envelope(coords) → {jsts.geom.Envelope}

Computes the {jsts.geom.Envelope} of an array of {jsts.geom.Coordinate}s
Parameters:
Name Type Description
coords
Source:
Returns:
The created envelope.
Type
jsts.geom.Envelope

(static) extractUniqueCoordinates(geom)

Extracts the unique Coordinates from the given Geometry.
Parameters:
Name Type Description
geom jsts.geom.Geometry the geometry to extract from.
Source:
Returns:

(static) toVertices(coords)

Converts an array of coordinates to an array of vertexes
Parameters:
Name Type Description
coords
Source:
Returns:

(static) unique(coords)

Removes any duplicates in the passed array.
Parameters:
Name Type Description
coords
Source:
Returns:

create()

Creates the Delaunay-triangulation.
Source:

getEdges(geomFact) → {jsts.geom.Geometry}

Gets the edges of the computed triangulation as a MultiLineString.
Parameters:
Name Type Description
geomFact jsts.geom.GeometryFactory the geometry factory to use to create the output.
Source:
Returns:
the edges of the triangulation.
Type
jsts.geom.Geometry

getSubdivision() → {jsts.triangulate.quadedge.QuadEdgeSubdivision}

Gets the {jsts.triangulate.quadedge.QuadEdgeSubdivision} which models the computed triangulation.
Source:
Returns:
containing the triangulation.
Type
jsts.triangulate.quadedge.QuadEdgeSubdivision

getTriangles(geomFact) → {jsts.geom.Geometry}

Gets the faces of the computed triangulation as a GeometryCollection of Polygon.
Parameters:
Name Type Description
geomFact jsts.geom.GeometryFactory the geometry factory to use to create the output.
Source:
Returns:
the faces of the triangulation.
Type
jsts.geom.Geometry

setSites()

Sets the sites which will be triangulated. Calls the correct setSites* function after argument-checking
Source:

setSitesFromCollection(coords)

Sets the sites (point or vertices) which will be triangulated from a collection of Coordinates.
Parameters:
Name Type Description
coords
Source:

setSitesFromGeometry(geom)

Sets the sites (point or vertices) which will be triangulated. All vertices of the given geometry will be used as sites.
Parameters:
Name Type Description
geom jsts.geom.Geometry the geometry from which the sites will be extracted.
Source:

setTolerance(tolerance)

Sets the snapping tolerance which will be used to improved the robustness of the triangulation computation. A tolerance of 0.0 specifies that no snapping will take place.
Parameters:
Name Type Description
tolerance Number the tolerance distance to use.
Source: