19 #ifndef GEOS_OP_UNION_OVERLAPUNION_H
20 #define GEOS_OP_UNION_OVERLAPUNION_H
22 #include <geos/export.h>
26 #include <unordered_set>
28 #include <geos/geom/Geometry.h>
90 class GEOS_DLL OverlapUnion {
94 OverlapUnion(
const geom::Geometry* p_g0,
const geom::Geometry* p_g1)
97 geomFactory = g0->getFactory();
101 std::unique_ptr<geom::Geometry> doUnion();
105 const geom::GeometryFactory* geomFactory;
106 const geom::Geometry* g0;
107 const geom::Geometry* g1;
110 geom::Envelope overlapEnvelope(
const geom::Geometry* geom0,
const geom::Geometry* geom1);
111 std::unique_ptr<geom::Geometry> extractByEnvelope(
const geom::Envelope& env,
const geom::Geometry* geom, std::vector<std::unique_ptr<geom::Geometry>>& disjointGeoms);
112 std::unique_ptr<geom::Geometry> combine(std::unique_ptr<geom::Geometry>& unionGeom, std::vector<std::unique_ptr<geom::Geometry>>& disjointPolys);
113 std::unique_ptr<geom::Geometry> unionFull(
const geom::Geometry* geom0,
const geom::Geometry* geom1);
114 std::unique_ptr<geom::Geometry> unionBuffer(
const geom::Geometry* geom0,
const geom::Geometry* geom1);
115 bool isBorderSegmentsSame(
const geom::Geometry* result,
const geom::Envelope& env);
116 bool isEqual(std::vector<geom::LineSegment>& segs0, std::vector<geom::LineSegment>& segs1);
117 std::vector<geom::LineSegment> extractBorderSegments(
const geom::Geometry* geom0,
const geom::Geometry* geom1,
const geom::Envelope& env);
118 void extractBorderSegments(
const geom::Geometry* geom,
const geom::Envelope& penv, std::vector<geom::LineSegment>& psegs);