ElevationMatrixCell.h

00001 /**********************************************************************
00002  *
00003  * GEOS - Geometry Engine Open Source
00004  * http://geos.osgeo.org
00005  *
00006  * Copyright (C) 2006 Refractions Research Inc.
00007  *
00008  * This is free software; you can redistribute and/or modify it under
00009  * the terms of the GNU Lesser General Public Licence as published
00010  * by the Free Software Foundation. 
00011  * See the COPYING file for more information.
00012  *
00013  ***********************************************************************
00014  *
00015  * Last port: original (by strk)
00016  *
00017  **********************************************************************/
00018 
00019 #ifndef GEOS_OP_OVERLAY_ELEVATIONMATRIXCELL_H
00020 #define GEOS_OP_OVERLAY_ELEVATIONMATRIXCELL_H
00021 
00022 #include <geos/export.h>
00023 
00024 #include <set>
00025 
00026 #ifdef _MSC_VER
00027 #pragma warning(push)
00028 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00029 #endif
00030 
00031 // Forward declarations
00032 namespace geos {
00033         namespace geom {
00034                 class Coordinate;
00035         }
00036 }
00037 
00038 namespace geos {
00039 namespace operation { // geos::operation
00040 namespace overlay { // geos::operation::overlay
00041 
00042 
00043 class GEOS_DLL ElevationMatrixCell {
00044 public:
00045         ElevationMatrixCell();
00046         ~ElevationMatrixCell();
00047         void add(const geom::Coordinate &c);
00048         void add(double z);
00049         double getAvg(void) const;
00050         double getTotal(void) const;
00051         std::string print() const;
00052 private:
00053         std::set<double>zvals;
00054         double ztot;
00055 };
00056 
00057 } // namespace geos::operation::overlay
00058 } // namespace geos::operation
00059 } // namespace geos
00060 
00061 #ifdef _MSC_VER
00062 #pragma warning(pop)
00063 #endif
00064 
00065 #endif // ndef GEOS_OP_OVERLAY_ELEVATIONMATRIXCELL_H

Generated on 10 Sep 2013 for GEOS by  doxygen 1.4.7