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

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