- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

# GeometryCombiner.h

    00001 /**********************************************************************
    00002  * $Id: GeometryCombiner.h 3177 2011-02-03 19:58:51Z strk $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2006-2011 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  *
    00016  * Last port: geom/util/GeometryCombiner.java r320 (JTS-1.12)
    00017  *
    00018  **********************************************************************/
    00019
    00020 #ifndef GEOS_GEOM_UTIL_GEOMETRYCOMBINER_H
    00021 #define GEOS_GEOM_UTIL_GEOMETRYCOMBINER_H
    00022
    00023 #include <vector>
    00024
    00025 // Forward declarations
    00026 namespace geos {
    00027     namespace geom {
    00028         class Geometry;
    00029         class GeometryFactory;
    00030     }
    00031 }
    00032
    00033 namespace geos {
    00034 namespace geom { // geos.geom
    00035 namespace util { // geos.geom.util
    00036
    00048 class GeometryCombiner
    00049 {
    00050 public:
    00057     static Geometry* combine(std::vector<Geometry*> const& geoms);
    00058
    00066     static Geometry* combine(const Geometry* g0, const Geometry* g1);
    00067
    00076     static Geometry* combine(const Geometry* g0, const Geometry* g1, const Geometry* g2);
    00077
    00078 private:
    00079     GeometryFactory const* geomFactory;
    00080     bool skipEmpty;
    00081     std::vector<Geometry*> const& inputGeoms;
    00082
    00083 public:
    00089     GeometryCombiner(std::vector<Geometry*> const& geoms);
    00090
    00097     static GeometryFactory const* extractFactory(std::vector<Geometry*> const& geoms);
    00098
    00105     Geometry* combine();
    00106
    00107 private:
    00108     void extractElements(Geometry* geom, std::vector<Geometry*>& elems);
    00109
    00110     // Declare type as noncopyable
    00111     GeometryCombiner(const GeometryCombiner& other);
    00112     GeometryCombiner& operator=(const GeometryCombiner& rhs);
    00113 };
    00114
    00115 } // namespace geos.geom.util
    00116 } // namespace geos.geom
    00117 } // namespace geos
    00118
    00119 #endif
    00120
    00121 /**********************************************************************
    00122  * $Log$
    00123  *
    00124  **********************************************************************/