58 bool get(
const Date& date_start,
const Date& date_end, std::vector< METEO_SET > &vecMeteo)
const;
111 size_t size()
const {
return ts_buffer.size();}
124 void push(
const Date& date_start,
const Date& date_end,
const std::vector< METEO_SET >& vecMeteo);
133 void push(
const Date& date_start,
const Date& date_end,
const std::vector<MeteoData>& vecMeteo);
142 std::vector< METEO_SET > ts_buffer;
143 Date ts_start, ts_end;
161 bool empty()
const {
return IndexBufferedGrids.empty();}
162 void clear() {mapBufferedGrids.clear(); mapBufferedInfos.clear(); IndexBufferedGrids.clear();}
163 size_t size()
const {
return IndexBufferedGrids.size();}
165 void setMaxGrids(
const size_t& in_max_grids) {max_grids=in_max_grids;}
167 bool get(
DEMObject& grid,
const std::string& grid_hash)
const;
169 bool get(
Grid2DObject& grid,
const std::string& grid_hash, std::string& grid_info)
const;
172 bool has(
const std::string& grid_hash)
const;
175 void push(
const DEMObject& grid,
const std::string& grid_hash);
177 void push(
const Grid2DObject& grid,
const std::string& grid_hash,
const std::string& grid_info);
182 std::map<std::string, Grid2DObject> mapBufferedGrids;
183 std::map<std::string, DEMObject> mapBufferedDEMs;
184 std::map<std::string, std::string> mapBufferedInfos;
185 std::vector<std::string> IndexBufferedGrids;
186 std::vector<std::string> IndexBufferedDEMs;
A class to represent DEMs and automatically compute some properties. This class stores elevation grid...
Definition: DEMObject.h:40
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
A class to represent 2D Grids. Typical application as DEM or Landuse Model.
Definition: Grid2DObject.h:42
A class to buffer gridded data. This class buffers Grid2D objects. It implements a proper ring buffer...
Definition: Buffer.h:157
const std::string toString() const
Definition: Buffer.cc:453
size_t size() const
Definition: Buffer.h:163
bool empty() const
Definition: Buffer.h:161
void clear()
Definition: Buffer.h:162
bool get(DEMObject &grid, const std::string &grid_hash) const
Definition: Buffer.cc:375
void push(const DEMObject &grid, const std::string &grid_hash)
Definition: Buffer.cc:406
GridBuffer(const size_t &in_max_grids)
Definition: Buffer.cc:322
void setMaxGrids(const size_t &in_max_grids)
Definition: Buffer.h:165
bool has(const std::string &grid_hash) const
Definition: Buffer.cc:362
A class to buffer meteorological data. This class buffers MeteoData objects. It is currently NOT a pr...
Definition: Buffer.h:39
MeteoBuffer()
Definition: Buffer.h:41
Date getDataStart() const
Returns the real beginning of the data contained in the buffer. This is the start date of the availab...
Definition: Buffer.cc:257
double getAvgSamplingRate() const
Returns the average sampling rate in the data. This computes the average sampling rate of the data th...
Definition: Buffer.cc:223
Date getBufferStart() const
Returns the beginning of the buffer. This is the start date of the request that was given to the IOHa...
Definition: Buffer.cc:247
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:252
bool empty() const
Check if the buffer is empty.
Definition: Buffer.cc:74
void setBufferStart(const Date &date)
Definition: Buffer.cc:290
std::vector< METEO_SET > & getBuffer()
Definition: Buffer.cc:285
Date getDataEnd() const
Returns the real end of the data contained in the buffer. This is the end date of the available data ...
Definition: Buffer.cc:271
const std::string toString() const
Definition: Buffer.cc:298
size_t size() const
Returns the number of stations present in the buffer.
Definition: Buffer.h:111
void clear()
Clear the buffer; the data is deleted and the start and end dates reset to undef
Definition: Buffer.cc:80
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:153
bool get(const Date &date, METEO_SET &vecMeteo) const
Get buffer data for a specific date.
Definition: Buffer.cc:29
void setBufferEnd(const Date &date)
Definition: Buffer.cc:294
Parameters
this enum provides names for possible meteogrids (from an ARPS file, etc)
Definition: MeteoData.h:46
std::vector< MeteoData > METEO_SET
Definition: MeteoData.h:32