GEOS  3.6.1
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 {
49 public:
56  static Geometry* combine(std::vector<Geometry*> const& geoms);
57 
65  static Geometry* combine(const Geometry* g0, const Geometry* g1);
66 
75  static Geometry* combine(const Geometry* g0, const Geometry* g1, const Geometry* g2);
76 
77 private:
78  GeometryFactory const* geomFactory;
79  bool skipEmpty;
80  std::vector<Geometry*> const& inputGeoms;
81 
82 public:
88  GeometryCombiner(std::vector<Geometry*> const& geoms);
89 
96  static GeometryFactory const* extractFactory(std::vector<Geometry*> const& geoms);
97 
104  Geometry* combine();
105 
106 private:
107  void extractElements(Geometry* geom, std::vector<Geometry*>& elems);
108 
109  // Declare type as noncopyable
110  GeometryCombiner(const GeometryCombiner& other);
111  GeometryCombiner& operator=(const GeometryCombiner& rhs);
112 };
113 
114 } // namespace geos.geom.util
115 } // namespace geos.geom
116 } // namespace geos
117 
118 #endif
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:167
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)
static GeometryFactory const * extractFactory(std::vector< Geometry *> const &geoms)