19 #ifndef GEOS_TRIANGULATE_VORONOIDIAGRAMBUILDER_H
20 #define GEOS_TRIANGULATE_VORONOIDIAGRAMBUILDER_H
22 #include <geos/triangulate/quadedge/QuadEdgeSubdivision.h>
23 #include <geos/geom/Envelope.h>
30 class CoordinateSequence;
31 class GeometryCollection;
32 class GeometryFactory;
34 namespace triangulate {
46 class GEOS_DLL VoronoiDiagramBuilder {
52 VoronoiDiagramBuilder();
54 ~VoronoiDiagramBuilder() =
default;
62 void setSites(
const geom::Geometry& geom);
70 void setSites(
const geom::CoordinateSequence& coords);
82 void setClipEnvelope(
const geom::Envelope* clipEnv);
92 void setTolerance(
double tolerance);
99 std::unique_ptr<quadedge::QuadEdgeSubdivision> getSubdivision();
108 std::unique_ptr<geom::GeometryCollection> getDiagram(
const geom::GeometryFactory& geomFact);
117 std::unique_ptr<geom::Geometry> getDiagramEdges(
const geom::GeometryFactory& geomFact);
121 std::unique_ptr<geom::CoordinateSequence> siteCoords;
123 std::unique_ptr<quadedge::QuadEdgeSubdivision> subdiv;
124 const geom::Envelope* clipEnv;
125 geom::Envelope diagramEnv;
129 static std::unique_ptr<geom::GeometryCollection>
130 clipGeometryCollection(std::vector<std::unique_ptr<geom::Geometry>> & geoms,
const geom::Envelope& clipEnv);
137 #endif //GEOS_TRIANGULATE_VORONOIDIAGRAMBUILDER_H