GEOS
3.9.0dev

A utility class which creates Voronoi Diagrams from collections of points. More...
#include <VoronoiDiagramBuilder.h>
Public Member Functions  
VoronoiDiagramBuilder ()  
Creates a new Voronoi diagram builder. More...  
void  setSites (const geom::Geometry &geom) 
Sets the sites (point or vertices) which will be diagrammed. All vertices of the given geometry will be used as sites. More...  
void  setSites (const geom::CoordinateSequence &coords) 
Sets the sites (point or vertices) which will be diagrammed from a collection of geom::Coordinates. More...  
void  setClipEnvelope (const geom::Envelope *clipEnv) 
Sets the envelope to clip the diagram to. More...  
void  setTolerance (double tolerance) 
Sets the snapping tolerance which will be used to improved the robustness of the triangulation computation. More...  
std::unique_ptr < quadedge::QuadEdgeSubdivision >  getSubdivision () 
Gets the quadedge::QuadEdgeSubdivision which models the computed diagram. More...  
std::unique_ptr < geom::GeometryCollection >  getDiagram (const geom::GeometryFactory &geomFact) 
Gets the faces of the computed diagram as a geom::GeometryCollection of geom::Polygons, clipped as specified. More...  
std::unique_ptr< geom::Geometry >  getDiagramEdges (const geom::GeometryFactory &geomFact) 
Gets the faces of the computed diagram as a geom::GeometryCollection of geom::LineStrings, clipped as specified. More...  
A utility class which creates Voronoi Diagrams from collections of points.
The diagram is returned as a geom::GeometryCollection of geom::Polygons, clipped to the larger of a supplied envelope or to an envelope determined by the input sites.
geos::triangulate::VoronoiDiagramBuilder::VoronoiDiagramBuilder  (  ) 
Creates a new Voronoi diagram builder.
std::unique_ptr<geom::GeometryCollection> geos::triangulate::VoronoiDiagramBuilder::getDiagram  (  const geom::GeometryFactory &  geomFact  ) 
Gets the faces of the computed diagram as a geom::GeometryCollection of geom::Polygons, clipped as specified.
geomFact  the geometry factory to use to create the output 
std::unique_ptr<geom::Geometry> geos::triangulate::VoronoiDiagramBuilder::getDiagramEdges  (  const geom::GeometryFactory &  geomFact  ) 
Gets the faces of the computed diagram as a geom::GeometryCollection of geom::LineStrings, clipped as specified.
geomFact  the geometry factory to use to create the output 
std::unique_ptr<quadedge::QuadEdgeSubdivision> geos::triangulate::VoronoiDiagramBuilder::getSubdivision  (  ) 
Gets the quadedge::QuadEdgeSubdivision which models the computed diagram.
void geos::triangulate::VoronoiDiagramBuilder::setClipEnvelope  (  const geom::Envelope *  clipEnv  ) 
Sets the envelope to clip the diagram to.
The diagram will be clipped to the larger of this envelope or an envelope surrounding the sites.
clipEnv  the clip envelope; must be kept alive by caller until done with this instance; set to 0 for no clipping. 
void geos::triangulate::VoronoiDiagramBuilder::setSites  (  const geom::Geometry &  geom  ) 
Sets the sites (point or vertices) which will be diagrammed. All vertices of the given geometry will be used as sites.
geom  the geometry from which the sites will be extracted. 
void geos::triangulate::VoronoiDiagramBuilder::setSites  (  const geom::CoordinateSequence &  coords  ) 
Sets the sites (point or vertices) which will be diagrammed from a collection of geom::Coordinates.
coords  a collection of Coordinates. 
void geos::triangulate::VoronoiDiagramBuilder::setTolerance  (  double  tolerance  ) 
Sets the snapping tolerance which will be used to improved the robustness of the triangulation computation.
A tolerance of 0.0 specifies that no snapping will take place.
tolerance  the tolerance distance to use 