00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GEOS_GEOM_UTIL_GEOMETRYCOMBINER_H
00016 #define GEOS_GEOM_UTIL_GEOMETRYCOMBINER_H
00017
00018 #include <vector>
00019
00020
00021 namespace geos {
00022 namespace geom {
00023 class Geometry;
00024 class GeometryFactory;
00025 }
00026 }
00027
00028 namespace geos {
00029 namespace geom {
00030 namespace util {
00031
00043 class GeometryCombiner
00044 {
00045 public:
00052 static Geometry* combine(std::vector<Geometry*> const& geoms);
00053
00061 static Geometry* combine(Geometry* g0, Geometry* g1);
00062
00071 static Geometry* combine(Geometry* g0, Geometry* g1, Geometry* g2);
00072
00073 private:
00074 GeometryFactory const* geomFactory;
00075 bool skipEmpty;
00076 std::vector<Geometry*> const& inputGeoms;
00077
00078 public:
00084 GeometryCombiner(std::vector<Geometry*> const& geoms);
00085
00092 static GeometryFactory const* extractFactory(std::vector<Geometry*> const& geoms);
00093
00100 Geometry* combine();
00101
00102 private:
00103 void extractElements(Geometry* geom, std::vector<Geometry*>& elems);
00104
00105
00106 GeometryCombiner(const GeometryCombiner& other);
00107 GeometryCombiner& operator=(const GeometryCombiner& rhs);
00108 };
00109
00110 }
00111 }
00112 }
00113
00114 #endif
00115
00116
00117
00118
00119