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;
93 static std::unique_ptr<geom::Geometry>
101 static std::unique_ptr<geom::Geometry>
102 Union(
const T& geoms,
109 static std::unique_ptr<geom::Geometry>
119 geomFact(&geomFactIn)
149 std::unique_ptr<geom::Geometry>
Union();
153 template <
typename T>
155 extractGeoms(
const T& geoms)
157 for(
typename T::const_iterator
170 using namespace geom::util;
176 GeometryExtracter::extract<geom::Polygon>(geom, polygons);
177 GeometryExtracter::extract<geom::LineString>(geom, lines);
178 GeometryExtracter::extract<geom::Point>(geom, points);
193 std::unique_ptr<geom::Geometry>
194 unionNoOpt(
const geom::Geometry& g0)
203 return BinaryOp(&g0, empty.get(), overlay::overlayOp(OverlayOp::opUNION));
215 std::unique_ptr<geom::Geometry> unionWithNull(std::unique_ptr<geom::Geometry> g0,
216 std::unique_ptr<geom::Geometry> g1);
218 std::vector<const geom::Polygon*> polygons;
219 std::vector<const geom::LineString*> lines;
220 std::vector<const geom::Point*> points;
222 const geom::GeometryFactory* geomFact;
224 std::unique_ptr<geom::Geometry> empty;