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)
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>
196 unionNoOpt(
const geom::Geometry& g0)
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;
223 const geom::GeometryFactory* geomFact;
224 std::unique_ptr<geom::Geometry> empty;
226 UnionStrategy* unionFunction;
227 ClassicUnionStrategy defaultUnionFunction;
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:65
std::unique_ptr< Geometry > createEmptyGeometry() const
Construct the EMPTY Geometry.
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
const GeometryFactory * getFactory() const
Gets the factory which contains the context in which this geometry was created.
Definition: Geometry.h:216
Unions a collection of Geometry or a single Geometry (which may be a collection) together.
Definition: UnaryUnionOp.h:86
std::unique_ptr< geom::Geometry > Union()
Gets the union of the input geometries.
Definition: UnionStrategy.h:40
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25