GEOS  3.8.0dev
GeometryCombiner.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2006-2011 Refractions Research Inc.
7  *
8  * This is free software; you can redistribute and/or modify it under
9  * the terms of the GNU Lesser General Public Licence as published
10  * by the Free Software Foundation.
11  * See the COPYING file for more information.
12  *
13  **********************************************************************
14  *
15  * Last port: geom/util/GeometryCombiner.java r320 (JTS-1.12)
16  *
17  **********************************************************************/
18 
19 #ifndef GEOS_GEOM_UTIL_GEOMETRYCOMBINER_H
20 #define GEOS_GEOM_UTIL_GEOMETRYCOMBINER_H
21 
22 #include <vector>
23 
24 // Forward declarations
25 namespace geos {
26 namespace geom {
27 class Geometry;
28 class GeometryFactory;
29 }
30 }
31 
32 namespace geos {
33 namespace geom { // geos.geom
34 namespace util { // geos.geom.util
35 
48 public:
55  static Geometry* combine(std::vector<Geometry*> const& geoms);
56 
64  static Geometry* combine(const Geometry* g0, const Geometry* g1);
65 
74  static Geometry* combine(const Geometry* g0, const Geometry* g1, const Geometry* g2);
75 
76 private:
77  GeometryFactory const* geomFactory;
78  bool skipEmpty;
79  std::vector<Geometry*> const& inputGeoms;
80 
81 public:
87  GeometryCombiner(std::vector<Geometry*> const& geoms);
88 
95  static GeometryFactory const* extractFactory(std::vector<Geometry*> const& geoms);
96 
103  Geometry* combine();
104 
105 private:
106  void extractElements(Geometry* geom, std::vector<Geometry*>& elems);
107 
108  // Declare type as noncopyable
109  GeometryCombiner(const GeometryCombiner& other) = delete;
110  GeometryCombiner& operator=(const GeometryCombiner& rhs) = delete;
111 };
112 
113 } // namespace geos.geom.util
114 } // namespace geos.geom
115 } // namespace geos
116 
117 #endif
static GeometryFactory const * extractFactory(std::vector< Geometry * > const &geoms)
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:187
Definition: GeometryCombiner.h:47
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:67
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
GeometryCombiner(std::vector< Geometry * > const &geoms)