Class ConstrainedDelaunayTriangulator
java.lang.Object
org.locationtech.jts.triangulate.polygon.ConstrainedDelaunayTriangulator
Computes the Constrained Delaunay Triangulation of polygons.
The Constrained Delaunay Triangulation of a polygon is a set of triangles
covering the polygon, with the maximum total interior angle over all
possible triangulations. It provides the "best quality" triangulation
of the polygon.
Holes are supported.
-
Constructor Summary
ConstructorsConstructorDescriptionConstrainedDelaunayTriangulator
(Geometry inputGeom) Constructs a new Constrained Delaunay triangulator. -
Method Summary
Modifier and TypeMethodDescriptionGets the triangulation as aGeometryCollection
of triangularPolygon
s.Gets the triangulation as a list ofTri
s.static Geometry
triangulate
(Geometry geom) Computes the Constrained Delaunay Triangulation of each polygon element in a geometry.
-
Constructor Details
-
ConstrainedDelaunayTriangulator
Constructs a new Constrained Delaunay triangulator.- Parameters:
inputGeom
- the input geometry
-
-
Method Details
-
triangulate
Computes the Constrained Delaunay Triangulation of each polygon element in a geometry.- Parameters:
geom
- the input geometry- Returns:
- a GeometryCollection of the computed triangle polygons
-
getResult
Gets the triangulation as aGeometryCollection
of triangularPolygon
s.- Returns:
- a collection of the result triangle polygons
-
getTriangles
Gets the triangulation as a list ofTri
s.- Returns:
- the list of Tris in the triangulation
-