Class Voronoi


  • public class Voronoi
    extends Object
    Voronoi algorithms
    Author:
    Nicolas Fortin
    • Constructor Detail

      • Voronoi

        public Voronoi()
        Constructor
      • Voronoi

        public Voronoi​(double epsilon)
        Constructor
        Parameters:
        epsilon - When merging triangles vertex, snap tolerance of points. Snap also when creating output voronoi.
    • Method Detail

      • setEnvelope

        public void setEnvelope​(org.locationtech.jts.geom.Envelope envelope)
                         throws org.locationtech.jts.geom.TopologyException
        Optional Voronoi envelope.
        Parameters:
        envelope - LineString or MultiLineString
        Throws:
        org.locationtech.jts.geom.TopologyException
      • generateTriangleNeighbors

        public Voronoi.Triple[] generateTriangleNeighbors​(org.locationtech.jts.geom.Geometry geometry)
                                                   throws org.locationtech.jts.geom.TopologyException
        Given the input TIN, construct a graph of triangle.
        Parameters:
        geometry - Collection of Polygon with 3 vertex.
        Returns:
        Array of triangle neighbors. Order and count is the same of the input array.
        Throws:
        org.locationtech.jts.geom.TopologyException - If incompatible type geometry is given
      • generateVoronoi

        public org.locationtech.jts.geom.GeometryCollection generateVoronoi​(int outputDimension)
                                                                     throws org.locationtech.jts.geom.TopologyException
        Generate Voronoi using the graph of triangle computed by generateTriangleNeighbors(org.locationtech.jts.geom.Geometry)
        Returns:
        Collection of LineString (edges of Voronoi)
        Throws:
        org.locationtech.jts.geom.TopologyException