19 #ifndef GEOS_OP_OVERLAY_ELEVATIONMATRIX_H 20 #define GEOS_OP_OVERLAY_ELEVATIONMATRIX_H 22 #include <geos/export.h> 24 #include <geos/geom/CoordinateFilter.h> 25 #include <geos/geom/Envelope.h> 26 #include <geos/operation/overlay/ElevationMatrixCell.h> 33 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 44 class ElevationMatrixFilter;
45 class ElevationMatrix;
61 class GEOS_DLL ElevationMatrixFilter:
public geom::CoordinateFilter {
63 ElevationMatrixFilter(ElevationMatrix& em);
64 ~ElevationMatrixFilter()
override =
default;
65 void filter_rw(geom::Coordinate* c)
const override;
66 void filter_ro(
const geom::Coordinate* c)
override;
72 ElevationMatrixFilter(
const ElevationMatrixFilter& other) =
delete;
73 ElevationMatrixFilter& operator=(
const ElevationMatrixFilter& rhs) =
delete;
79 class GEOS_DLL ElevationMatrix {
80 friend class ElevationMatrixFilter;
82 ElevationMatrix(
const geom::Envelope& extent,
unsigned int rows,
84 ~ElevationMatrix() =
default;
85 void add(
const geom::Geometry* geom);
86 void elevate(geom::Geometry* geom)
const;
88 double getAvgElevation()
const;
89 ElevationMatrixCell& getCell(
const geom::Coordinate& c);
90 const ElevationMatrixCell& getCell(
const geom::Coordinate& c)
const;
91 std::string print()
const;
93 ElevationMatrixFilter filter;
94 void add(
const geom::Coordinate& c);
100 mutable bool avgElevationComputed;
101 mutable double avgElevation;
102 std::vector<ElevationMatrixCell>cells;
113 #endif // ndef GEOS_OP_OVERLAY_ELEVATIONMATRIX_H Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25