GEOS 3.9.1
ElevationMatrixCell.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2006 Refractions Research Inc.
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 ***********************************************************************
14 *
15 * Last port: original (by strk)
16 *
17 **********************************************************************/
18
19#ifndef GEOS_OP_OVERLAY_ELEVATIONMATRIXCELL_H
20#define GEOS_OP_OVERLAY_ELEVATIONMATRIXCELL_H
21
22#include <geos/export.h>
23
24#include <set>
25
26#ifdef _MSC_VER
27#pragma warning(push)
28#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
29#endif
30
31// Forward declarations
32namespace geos {
33namespace geom {
34class Coordinate;
35}
36}
37
38namespace geos {
39namespace operation { // geos::operation
40namespace overlay { // geos::operation::overlay
41
42
43class GEOS_DLL ElevationMatrixCell {
44public:
45 ElevationMatrixCell();
46 ~ElevationMatrixCell() = default;
47 void add(const geom::Coordinate& c);
48 void add(double z);
49 double getAvg(void) const;
50 double getTotal(void) const;
51 std::string print() const;
52private:
53 std::set<double>zvals;
54 double ztot;
55};
56
57} // namespace geos::operation::overlay
58} // namespace geos::operation
59} // namespace geos
60
61#ifdef _MSC_VER
62#pragma warning(pop)
63#endif
64
65#endif // ndef GEOS_OP_OVERLAY_ELEVATIONMATRIXCELL_H
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26