Class ConstrainedDelaunayTriangulator

java.lang.Object
org.locationtech.jts.triangulate.polygon.ConstrainedDelaunayTriangulator

public class ConstrainedDelaunayTriangulator extends 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 Details

    • ConstrainedDelaunayTriangulator

      public ConstrainedDelaunayTriangulator(Geometry inputGeom)
      Constructs a new Constrained Delaunay triangulator.
      Parameters:
      inputGeom - the input geometry
  • Method Details

    • 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 a GeometryCollection of triangular Polygons.
      Returns:
      a collection of the result triangle polygons
    • getTriangles

      public List<Tri> getTriangles()
      Gets the triangulation as a list of Tris.
      Returns:
      the list of Tris in the triangulation