Class ConstrainedDelaunayTriangulator
- java.lang.Object
-
- org.locationtech.jts.triangulate.polygon.ConstrainedDelaunayTriangulator
-
public class ConstrainedDelaunayTriangulator extends java.lang.Object
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
Constructors Constructor Description ConstrainedDelaunayTriangulator(Geometry inputGeom)
Constructs a new Constrained Delaunay triangulator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Geometry
getResult()
Gets the triangulation as aGeometryCollection
of triangularPolygon
s.java.util.List<Tri>
getTriangles()
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 Detail
-
ConstrainedDelaunayTriangulator
public ConstrainedDelaunayTriangulator(Geometry inputGeom)
Constructs a new Constrained Delaunay triangulator.- Parameters:
inputGeom
- the input geometry
-
-
Method Detail
-
triangulate
public static Geometry triangulate(Geometry geom)
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
public Geometry getResult()
Gets the triangulation as aGeometryCollection
of triangularPolygon
s.- Returns:
- a collection of the result triangle polygons
-
-