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> 34 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 40 class GeometryFactory;
90 static std::unique_ptr<geom::Geometry>
98 static std::unique_ptr<geom::Geometry>
106 static std::unique_ptr<geom::Geometry>
115 : geomFact(&geomFactIn)
116 , unionFunction(&defaultUnionFunction)
124 , unionFunction(&defaultUnionFunction)
131 , unionFunction(&defaultUnionFunction)
138 unionFunction = unionFun;
151 std::unique_ptr<geom::Geometry> Union();
155 template <
typename T>
157 extractGeoms(
const T& geoms)
159 for(
typename T::const_iterator
172 using namespace geom::util;
178 GeometryExtracter::extract<geom::Polygon>(geom, polygons);
179 GeometryExtracter::extract<geom::LineString>(geom, lines);
180 GeometryExtracter::extract<geom::Point>(geom, points);
195 std::unique_ptr<geom::Geometry>
201 return unionFunction->Union(&g0, empty.get());
213 std::unique_ptr<geom::Geometry> unionWithNull(
214 std::unique_ptr<geom::Geometry> g0,
215 std::unique_ptr<geom::Geometry> g1
219 std::vector<const geom::Polygon*> polygons;
220 std::vector<const geom::LineString*> lines;
221 std::vector<const geom::Point*> points;
224 std::unique_ptr<geom::Geometry> empty;
Unions a collection of Geometry or a single Geometry (which may be a collection) together.
Definition: UnaryUnionOp.h:86
Implementation of UnionStrategy that provides overlay using the first generation overlay routines...
Definition: CascadedPolygonUnion.h:48
Definition: UnionStrategy.h:40
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:65
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
std::unique_ptr< Geometry > createEmptyGeometry() const
Construct the EMPTY Geometry.