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/overlay/OverlayOp.h> 31 #include <geos/operation/union/CascadedPolygonUnion.h> 35 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 41 class GeometryFactory;
91 static std::unique_ptr<geom::Geometry>
99 static std::unique_ptr<geom::Geometry>
100 Union(
const T& geoms,
107 static std::unique_ptr<geom::Geometry>
116 : geomFact(&geomFactIn)
117 , unionFunction(&defaultUnionFunction)
125 , unionFunction(&defaultUnionFunction)
132 , unionFunction(&defaultUnionFunction)
139 unionFunction = unionFun;
152 std::unique_ptr<geom::Geometry> Union();
156 template <
typename T>
158 extractGeoms(
const T& geoms)
160 for(
typename T::const_iterator
173 using namespace geom::util;
179 GeometryExtracter::extract<geom::Polygon>(geom, polygons);
180 GeometryExtracter::extract<geom::LineString>(geom, lines);
181 GeometryExtracter::extract<geom::Point>(geom, points);
196 std::unique_ptr<geom::Geometry>
204 return unionFunction->Union(&g0, empty.get());
216 std::unique_ptr<geom::Geometry> unionWithNull(
217 std::unique_ptr<geom::Geometry> g0,
218 std::unique_ptr<geom::Geometry> g1
222 std::vector<const geom::Polygon*> polygons;
223 std::vector<const geom::LineString*> lines;
224 std::vector<const geom::Point*> points;
227 std::unique_ptr<geom::Geometry> empty;
Unions a collection of Geometry or a single Geometry (which may be a collection) together.
Definition: UnaryUnionOp.h:87
Implementation of UnionStrategy that provides overlay using the first generation overlay routines...
Definition: CascadedPolygonUnion.h:48
Definition: UnionStrategy.h:40
Computes the geometric overlay of two Geometry.
Definition: OverlayOp.h:69
const GeometryFactory * getFactory() const
Gets the factory which contains the context in which this geometry was created.
Definition: Geometry.h:216
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:66
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
std::unique_ptr< Geometry > createEmptyGeometry() const
Construct the EMPTY Geometry.