Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

GeometryCombiner.h

00001 /**********************************************************************
00002  * $Id: GeometryCombiner.h 2253 2009-01-23 23:58:18Z 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 
00106 } // namespace geos.geom.util
00107 } // namespace geos.geom
00108 } // namespace geos
00109 
00110 #endif
00111 
00112 /**********************************************************************
00113  * $Log$
00114  *
00115  **********************************************************************/

Generated on Thu Jun 11 06:17:01 2009 for GEOS by  doxygen 1.4.4