Package org.h2gis.utilities.jts_utils
Class Voronoi
- java.lang.Object
-
- org.h2gis.utilities.jts_utils.Voronoi
-
public class Voronoi extends Object
Voronoi algorithms- Author:
- Nicolas Fortin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVoronoi.ReplaceZReplaces the z value to each vertex of the Geometry.static classVoronoi.TripleTriangle vertex and neighbors information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Voronoi.Triple[]generateTriangleNeighbors(org.locationtech.jts.geom.Geometry geometry)Given the input TIN, construct a graph of triangle.org.locationtech.jts.geom.GeometryCollectiongenerateVoronoi(int outputDimension)Generate Voronoi using the graph of triangle computed bygenerateTriangleNeighbors(org.locationtech.jts.geom.Geometry)voidsetEnvelope(org.locationtech.jts.geom.Envelope envelope)Optional Voronoi envelope.
-
-
-
Method Detail
-
setEnvelope
public void setEnvelope(org.locationtech.jts.geom.Envelope envelope) throws org.locationtech.jts.geom.TopologyExceptionOptional 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.TopologyExceptionGenerate Voronoi using the graph of triangle computed bygenerateTriangleNeighbors(org.locationtech.jts.geom.Geometry)- Returns:
- Collection of LineString (edges of Voronoi)
- Throws:
org.locationtech.jts.geom.TopologyException
-
-