# ElevationMatrixCell.h

    00001 /**********************************************************************
    00002  * $Id: ElevationMatrixCell.h 1820 2006-09-06 16:54:23Z 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
    00016 #ifndef GEOS_OP_OVERLAY_ELEVATIONMATRIXCELL_H
    00017 #define GEOS_OP_OVERLAY_ELEVATIONMATRIXCELL_H
    00018
    00019 #include <set>
    00020
    00021 // Forward declarations
    00022 namespace geos {
    00023         namespace geom {
    00024                 class Coordinate;
    00025         }
    00026 }
    00027
    00028 namespace geos {
    00029 namespace operation { // geos::operation
    00030 namespace overlay { // geos::operation::overlay
    00031
    00032
    00033 class ElevationMatrixCell {
    00034 public:
    00035         ElevationMatrixCell();
    00036         ~ElevationMatrixCell();
    00037         void add(const geom::Coordinate &c);
    00038         void add(double z);
    00039         double getAvg(void) const;
    00040         double getTotal(void) const;
    00041         std::string print() const;
    00042 private:
    00043         std::set<double>zvals;
    00044         double ztot;
    00045 };
    00046
    00047 } // namespace geos::operation::overlay
    00048 } // namespace geos::operation
    00049 } // namespace geos
    00050
    00051 #endif // ndef GEOS_OP_OVERLAY_ELEVATIONMATRIXCELL_H
    00052
    00053 /**********************************************************************
    00054  * $Log$
    00055  * Revision 1.1  2006/03/17 13:24:59  strk
    00056  * opOverlay.h header splitted. Reduced header inclusions in operation/overlay implementation files. ElevationMatrixFilter code moved from own file to ElevationMatrix.cpp (ideally a class-private).
    00057  *
    00058  **********************************************************************/
    00059