• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List

GeometryCombiner.h

00001 /**********************************************************************
00002  * $Id: GeometryCombiner.h 2772 2009-12-03 19:30:54Z mloskot $
00003  *
00004  * GEOS - Geometry Engine Open Source
00005  * http://geos.refractions.net
00006  *
00007  * Copyright (C) 2006 Refractions Research Inc.
00008  *
00009  * This is free software; you can redistribute and/or modify it under
00010  * the terms of the GNU Lesser General Public Licence as published
00011  * by the Free Software Foundation. 
00012  * See the COPYING file for more information.
00013  *
00014  **********************************************************************/
00015 #ifndef GEOS_GEOM_UTIL_GEOMETRYCOMBINER_H
00016 #define GEOS_GEOM_UTIL_GEOMETRYCOMBINER_H
00017 
00018 #include <vector>
00019 
00020 // Forward declarations
00021 namespace geos {
00022     namespace geom {
00023         class Geometry;
00024         class GeometryFactory;
00025     }
00026 }
00027 
00028 namespace geos {
00029 namespace geom { // geos.geom
00030 namespace util { // geos.geom.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     // Declare type as noncopyable
00106     GeometryCombiner(const GeometryCombiner& other);
00107     GeometryCombiner& operator=(const GeometryCombiner& rhs);
00108 };
00109 
00110 } // namespace geos.geom.util
00111 } // namespace geos.geom
00112 } // namespace geos
00113 
00114 #endif
00115 
00116 /**********************************************************************
00117  * $Log$
00118  *
00119  **********************************************************************/

Generated on Thu Jul 22 2010 for GEOS by  doxygen 1.7.1