20 #ifndef GEOS_OP_OVERLAY_ELEVATIONMATRIX_H
21 #define GEOS_OP_OVERLAY_ELEVATIONMATRIX_H
23 #include <geos/export.h>
25 #include <geos/geom/CoordinateFilter.h>
26 #include <geos/geom/Envelope.h>
27 #include <geos/operation/overlay/ElevationMatrixCell.h>
34 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
45 class ElevationMatrixFilter;
46 class ElevationMatrix;
62 class GEOS_DLL ElevationMatrixFilter:
public geom::CoordinateFilter
65 ElevationMatrixFilter(ElevationMatrix &em);
66 ~ElevationMatrixFilter();
67 void filter_rw(geom::Coordinate *c)
const;
68 void filter_ro(
const geom::Coordinate *c);
74 ElevationMatrixFilter(
const ElevationMatrixFilter& other);
75 ElevationMatrixFilter& operator=(
const ElevationMatrixFilter& rhs);
81 class GEOS_DLL ElevationMatrix {
82 friend class ElevationMatrixFilter;
84 ElevationMatrix(
const geom::Envelope &extent,
unsigned int rows,
87 void add(
const geom::Geometry *geom);
88 void elevate(geom::Geometry *geom)
const;
90 double getAvgElevation()
const;
91 ElevationMatrixCell &getCell(
const geom::Coordinate &c);
92 const ElevationMatrixCell &getCell(
const geom::Coordinate &c)
const;
93 std::string print()
const;
95 ElevationMatrixFilter filter;
96 void add(
const geom::Coordinate &c);
102 mutable bool avgElevationComputed;
103 mutable double avgElevation;
104 std::vector<ElevationMatrixCell>cells;
115 #endif // ndef GEOS_OP_OVERLAY_ELEVATIONMATRIX_H