57 bool get(
const Date& date_start,
const Date& date_end, std::vector< METEO_SET > &vecMeteo)
const;
103 void push(
const Date& date_start,
const Date& date_end,
const std::vector< METEO_SET >& vecMeteo);
112 void push(
const Date& date_start,
const Date& date_end,
const std::vector<MeteoData>& vecMeteo);
121 std::vector< METEO_SET > ts_buffer;
122 Date ts_start, ts_end;
140 bool empty()
const {
return IndexBufferedGrids.empty();}
141 void clear() {mapBufferedGrids.clear(); mapBufferedInfos.clear(); IndexBufferedGrids.clear();}
142 size_t size()
const {
return IndexBufferedGrids.size();}
144 void setMaxGrids(
const size_t& in_max_grids) {max_grids=in_max_grids;}
146 bool get(
DEMObject& grid,
const std::string& grid_hash)
const;
147 bool get(
Grid2DObject& grid,
const std::string& grid_hash)
const;
148 bool get(
Grid2DObject& grid,
const std::string& grid_hash, std::string& grid_info)
const;
151 void push(
const DEMObject& grid,
const std::string& grid_hash);
153 void push(
const Grid2DObject& grid,
const std::string& grid_hash,
const std::string& grid_info);
158 std::map<std::string, Grid2DObject> mapBufferedGrids;
159 std::map<std::string, DEMObject> mapBufferedDEMs;
160 std::map<std::string, std::string> mapBufferedInfos;
161 std::vector<std::string> IndexBufferedGrids;
162 std::vector<std::string> IndexBufferedDEMs;
A class to buffer meteorological data. This class buffers MeteoData objects. It is currently NOT a pr...
Definition: Buffer.h:38
std::vector< MeteoData > METEO_SET
Definition: MeteoData.h:29
bool empty() const
Check if the buffer is empty.
Definition: Buffer.cc:74
bool empty() const
Definition: Buffer.h:140
void clear()
Definition: Buffer.h:141
MeteoBuffer()
Definition: Buffer.h:40
size_t size() const
Definition: Buffer.h:142
double getAvgSamplingRate() const
Returns the average sampling rate in the data. This computes the average sampling rate of the data th...
Definition: Buffer.cc:227
const std::string toString() const
Definition: Buffer.cc:274
A class to buffer gridded data. This class buffers Grid2D objects. It implements a proper ring buffer...
Definition: Buffer.h:136
Date getBufferEnd() const
Returns the end of the buffer. This is the end date of the request that was given to the IOHandler...
Definition: Buffer.cc:256
void setMaxGrids(const size_t &in_max_grids)
Definition: Buffer.h:144
A class to represent DEMs and automatically compute some properties. This class stores elevation grid...
Definition: DEMObject.h:39
void push(const DEMObject &grid, const std::string &grid_hash)
Definition: Buffer.cc:367
Date getBufferStart() const
Returns the begining of the buffer. This is the start date of the request that was given to the IOHan...
Definition: Buffer.cc:251
A class to represent 2D Grids. Typical application as DEM or Landuse Model.
Definition: Grid2DObject.h:37
void setBufferStart(const Date &date)
Definition: Buffer.cc:266
void clear()
Clear the buffer; the data is deleted and the start and end dates reset to undef
Definition: Buffer.cc:80
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:79
GridBuffer(const size_t &in_max_grids)
Definition: Buffer.cc:297
const std::string toString() const
Definition: Buffer.cc:414
void push(const Date &date_start, const Date &date_end, const std::vector< METEO_SET > &vecMeteo)
Add data representing the available data between two dates.
Definition: Buffer.cc:152
std::vector< METEO_SET > & getBuffer()
Definition: Buffer.cc:261
Parameters
Definition: MeteoData.h:44
void setBufferEnd(const Date &date)
Definition: Buffer.cc:270