19#ifndef GEOS_OP_UNION_UNARYUNION_H
20#define GEOS_OP_UNION_UNARYUNION_H
25#include <geos/export.h>
26#include <geos/geom/GeometryFactory.h>
27#include <geos/geom/Point.h>
28#include <geos/geom/LineString.h>
29#include <geos/geom/Polygon.h>
30#include <geos/geom/util/GeometryExtracter.h>
31#include <geos/operation/overlay/OverlayOp.h>
32#include <geos/operation/union/CascadedPolygonUnion.h>
37#pragma warning(disable: 4251)
93 static std::unique_ptr<geom::Geometry>
101 static std::unique_ptr<geom::Geometry>
102 Union(
const T& geoms,
109 static std::unique_ptr<geom::Geometry>
118 : geomFact(&geomFactIn)
119 , unionFunction(&defaultUnionFunction)
127 , unionFunction(&defaultUnionFunction)
134 , unionFunction(&defaultUnionFunction)
141 unionFunction = unionFun;
154 std::unique_ptr<geom::Geometry>
Union();
158 template <
typename T>
160 extractGeoms(
const T& geoms)
162 for(
typename T::const_iterator
175 using namespace geom::util;
181 GeometryExtracter::extract<geom::Polygon>(geom, polygons);
182 GeometryExtracter::extract<geom::LineString>(geom, lines);
183 GeometryExtracter::extract<geom::Point>(geom, points);
198 std::unique_ptr<geom::Geometry>
199 unionNoOpt(
const geom::Geometry& g0)
208 return unionFunction->Union(&g0, empty.get());
220 std::unique_ptr<geom::Geometry> unionWithNull(
221 std::unique_ptr<geom::Geometry> g0,
222 std::unique_ptr<geom::Geometry> g1
226 std::vector<const geom::Polygon*> polygons;
227 std::vector<const geom::LineString*> lines;
228 std::vector<const geom::Point*> points;
230 const geom::GeometryFactory* geomFact;
231 std::unique_ptr<geom::Geometry> empty;
233 UnionStrategy* unionFunction;
234 ClassicUnionStrategy defaultUnionFunction;
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:68
std::unique_ptr< Geometry > createEmptyGeometry() const
Construct the EMPTY Geometry.
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:188
const GeometryFactory * getFactory() const
Gets the factory which contains the context in which this geometry was created.
Definition Geometry.h:218
Unions a collection of Geometry or a single Geometry (which may be a collection) together.
Definition UnaryUnionOp.h:89
std::unique_ptr< geom::Geometry > Union()
Gets the union of the input geometries.
Definition UnionStrategy.h:40
Computes the geometric overlay of two Geometry.
Definition OverlayOp.h:70
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26