20 #ifndef GEOS_OP_UNION_UNARYUNION_H
21 #define GEOS_OP_UNION_UNARYUNION_H
26 #include <geos/export.h>
27 #include <geos/geom/GeometryFactory.h>
28 #include <geos/geom/BinaryOp.h>
29 #include <geos/geom/Point.h>
30 #include <geos/geom/LineString.h>
31 #include <geos/geom/Polygon.h>
32 #include <geos/geom/util/GeometryExtracter.h>
33 #include <geos/operation/overlay/OverlayOp.h>
38 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
44 class GeometryFactory;
91 static std::auto_ptr<geom::Geometry> Union(
const T& geoms)
98 static std::auto_ptr<geom::Geometry> Union(
const T& geoms,
105 static std::auto_ptr<geom::Geometry> Union(
const geom::Geometry& geom)
114 geomFact(&geomFactIn)
144 std::auto_ptr<geom::Geometry> Union();
148 template <
typename T>
149 void extractGeoms(
const T& geoms)
151 for (
typename T::const_iterator
164 using namespace geom::util;
166 if ( ! geomFact ) geomFact = geom.
getFactory();
168 GeometryExtracter::extract<geom::Polygon>(geom, polygons);
169 GeometryExtracter::extract<geom::LineString>(geom, lines);
170 GeometryExtracter::extract<geom::Point>(geom, points);
185 std::auto_ptr<geom::Geometry> unionNoOpt(
const geom::Geometry& g0)
190 if ( ! empty.get() ) {
206 std::auto_ptr<geom::Geometry> unionWithNull(std::auto_ptr<geom::Geometry> g0,
207 std::auto_ptr<geom::Geometry> g1);
209 std::vector<const geom::Polygon*> polygons;
210 std::vector<const geom::LineString*> lines;
211 std::vector<const geom::Point*> points;
215 std::auto_ptr<geom::Geometry> empty;