24#include <geos/export.h>
25#include <geos/geom/GeometryFactory.h>
26#include <geos/geom/Point.h>
27#include <geos/geom/LineString.h>
28#include <geos/geom/Polygon.h>
29#include <geos/geom/util/GeometryExtracter.h>
30#include <geos/operation/union/CascadedPolygonUnion.h>
31#include <geos/util/Progress.h>
37#pragma warning(disable: 4251)
93 static std::unique_ptr<geom::Geometry>
98 return op.Union(progressFunction);
102 static std::unique_ptr<geom::Geometry>
103 Union(
const T& geoms,
108 return op.Union(progressFunction);
111 static std::unique_ptr<geom::Geometry>
115 return op.Union(progressFunction);
120 : geomFact(&geomFactIn)
121 , unionFunction(&defaultUnionFunction)
129 , unionFunction(&defaultUnionFunction)
136 , unionFunction(&defaultUnionFunction)
143 unionFunction = unionFun;
160 template <
typename T>
162 extractGeoms(
const T& geoms)
164 for(
typename T::const_iterator
188 std::unique_ptr<geom::Geometry>
194 return unionFunction->Union(&g0, empty.get());
206 static std::unique_ptr<geom::Geometry> unionWithNull(
207 std::unique_ptr<geom::Geometry> g0,
208 std::unique_ptr<geom::Geometry> g1
212 std::vector<const geom::Surface*> polygons;
213 std::vector<const geom::Curve*> lines;
214 std::vector<const geom::Point*> points;
216 const geom::GeometryFactory* geomFact;
217 std::unique_ptr<geom::Geometry> empty;
219 UnionStrategy* unionFunction;
220 ClassicUnionStrategy defaultUnionFunction;
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:72
std::unique_ptr< Geometry > createEmptyGeometry(GeometryTypeId type=GEOS_GEOMETRYCOLLECTION, bool hasZ=false, bool hasM=false) const
Construct the EMPTY Geometry.
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:201
const GeometryFactory * getFactory() const
Gets the factory which contains the context in which this geometry was created.
Definition: Geometry.h:231
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(geos::util::ProgressFunction *progressFunction)
Gets the union of the input geometries.
Definition: UnionStrategy.h:40
std::function< void(double, const char *)> ProgressFunction
Definition: Progress.h:29
Basic namespace for all GEOS functionalities.
Definition: geos.h:38