public class VoronoiDiagramBuilder extends Object
GeometryCollection of
Polygons representing the faces of the Voronoi diagram. The faces are clipped to the larger of:
setClipEnvelope(Envelope) | Constructor and Description |
|---|
VoronoiDiagramBuilder()
Creates a new Voronoi diagram builder.
|
| Modifier and Type | Method and Description |
|---|---|
Geometry |
getDiagram(GeometryFactory
Gets the faces of the computed diagram as a
GeometryCollection of
Polygons, clipped as specified.
|
QuadEdgeSubdivision |
getSubdivision()
Gets the
QuadEdgeSubdivision which models the computed diagram.
|
void |
setClipEnvelope(Envelope
Sets the envelope to clip the diagram to.
|
void |
setSites(Collection
Sets the sites (point or vertices) which will be diagrammed from a collection of
Coordinates.
|
void |
setSites(Geometry
Sets the sites (point or vertices) which will be diagrammed.
|
void |
setTolerance(double tolerance)
Sets the snapping tolerance which will be used to improved the robustness of the triangulation computation.
|
public VoronoiDiagramBuilder()
public void setSites(Geometrygeom)
geom - the geometry from which the sites will be extracted.
public void setSites(Collectioncoords)
Coordinates.
coords - a collection of Coordinates.
public void setClipEnvelope(EnvelopeclipEnv)
clipEnv - the clip envelope.
public void setTolerance(double tolerance)
tolerance - the tolerance distance to use
public QuadEdgeSubdivisiongetSubdivision()
QuadEdgeSubdivision which models the computed diagram.
public GeometrygetDiagram(GeometryFactory geomFact)
GeometryCollection of
Polygons, clipped as specified.
The userData attribute of each face Polygon is set to the Coordinate of the corresponding input site. This allows using a Map to link faces to data associated with sites.
geomFact - the geometry factory to use to create the output