00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GEOS_GEOM_UTIL_GEOMETRYCOMBINER_H
00021 #define GEOS_GEOM_UTIL_GEOMETRYCOMBINER_H
00022
00023 #include <vector>
00024
00025
00026 namespace geos {
00027 namespace geom {
00028 class Geometry;
00029 class GeometryFactory;
00030 }
00031 }
00032
00033 namespace geos {
00034 namespace geom {
00035 namespace util {
00036
00048 class GeometryCombiner
00049 {
00050 public:
00057 static Geometry* combine(std::vector<Geometry*> const& geoms);
00058
00066 static Geometry* combine(const Geometry* g0, const Geometry* g1);
00067
00076 static Geometry* combine(const Geometry* g0, const Geometry* g1, const Geometry* g2);
00077
00078 private:
00079 GeometryFactory const* geomFactory;
00080 bool skipEmpty;
00081 std::vector<Geometry*> const& inputGeoms;
00082
00083 public:
00089 GeometryCombiner(std::vector<Geometry*> const& geoms);
00090
00097 static GeometryFactory const* extractFactory(std::vector<Geometry*> const& geoms);
00098
00105 Geometry* combine();
00106
00107 private:
00108 void extractElements(Geometry* geom, std::vector<Geometry*>& elems);
00109
00110
00111 GeometryCombiner(const GeometryCombiner& other);
00112 GeometryCombiner& operator=(const GeometryCombiner& rhs);
00113 };
00114
00115 }
00116 }
00117 }
00118
00119 #endif
00120
00121
00122
00123
00124