GEOS 3.11.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#pragma once
20
21#include <geos/export.h>
22
23#include <set>
24
25#ifdef _MSC_VER
26#pragma warning(push)
27#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
28#endif
29
30// Forward declarations
31namespace geos {
32namespace geom {
33class Coordinate;
34}
35}
36
37namespace geos {
38namespace operation { // geos::operation
39namespace overlay { // geos::operation::overlay
40
41
42class GEOS_DLL ElevationMatrixCell {
43public:
44 ElevationMatrixCell();
45 ~ElevationMatrixCell() = default;
46 void add(const geom::Coordinate& c);
47 void add(double z);
48 double getAvg(void) const;
49 double getTotal(void) const;
50 std::string print() const;
51private:
52 std::set<double>zvals;
53 double ztot;
54};
55
56} // namespace geos::operation::overlay
57} // namespace geos::operation
58} // namespace geos
59
60#ifdef _MSC_VER
61#pragma warning(pop)
62#endif
63
Basic namespace for all GEOS functionalities.
Definition: geos.h:39