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