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/BinaryOp.h>
28 #include <geos/geom/Point.h>
29 #include <geos/geom/LineString.h>
30 #include <geos/geom/Polygon.h>
31 #include <geos/geom/util/GeometryExtracter.h>
32 #include <geos/operation/overlay/OverlayOp.h>
37 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
43 class GeometryFactory;
90 static std::auto_ptr<geom::Geometry> Union(
const T& geoms)
97 static std::auto_ptr<geom::Geometry> Union(
const T& geoms,
104 static std::auto_ptr<geom::Geometry> Union(
const geom::Geometry& geom)
113 geomFact(&geomFactIn)
143 std::auto_ptr<geom::Geometry> Union();
147 template <
typename T>
148 void extractGeoms(
const T& geoms)
150 for (
typename T::const_iterator
163 using namespace geom::util;
165 if ( ! geomFact ) geomFact = geom.
getFactory();
167 GeometryExtracter::extract<geom::Polygon>(geom, polygons);
168 GeometryExtracter::extract<geom::LineString>(geom, lines);
169 GeometryExtracter::extract<geom::Point>(geom, points);
184 std::auto_ptr<geom::Geometry> unionNoOpt(
const geom::Geometry& g0)
189 if ( ! empty.get() ) {
205 std::auto_ptr<geom::Geometry> unionWithNull(std::auto_ptr<geom::Geometry> g0,
206 std::auto_ptr<geom::Geometry> g1);
208 std::vector<const geom::Polygon*> polygons;
209 std::vector<const geom::LineString*> lines;
210 std::vector<const geom::Point*> points;
214 std::auto_ptr<geom::Geometry> empty;
Definition: UnaryUnionOp.h:85
Computes the geometric overlay of two Geometry.
Definition: OverlayOp.h:67
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:167
const GeometryFactory * getFactory() const
Gets the factory which contains the context in which this geometry was created.
Definition: Geometry.h:196
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:67
OverlayOp::overlayOp Adapter for use with geom::BinaryOp.
Definition: OverlayOp.h:375
Geometry * createEmptyGeometry() const
Construct the EMPTY Geometry.