MeteoIODoc 20250905.f67af007
 
Loading...
Searching...
No Matches
GridProcessor.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2/***********************************************************************************/
3/* Copyright 2021 MobyGIS Srl, Trento, Italy */
4/***********************************************************************************/
5/* This file is part of MeteoIO.
6 MeteoIO is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 MeteoIO is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef GRIDPROCESSOR_H
21#define GRIDPROCESSOR_H
22
24#include <meteoio/Config.h>
26
27#include <map>
28#include <string>
29
30namespace mio {
31
39 public:
40 GridProcessor(const Config& cfg);
41 bool resample(const Date& date, const MeteoGrids::Parameters& parameter, const std::map<Date, Grid2DObject>& all_grids, Grid2DObject& resampled_grid);
42 static std::map<Date, Grid2DObject>::const_iterator seek(const Date& date, const std::map<Date, Grid2DObject>& grids, const bool& exact_match = false);
43 static std::map<Date, Grid2DObject>::const_iterator seek_before(const Date& date, const std::map<Date, Grid2DObject>& grids);
44 static std::map<Date, Grid2DObject>::const_iterator seek_after(const Date& date, const std::map<Date, Grid2DObject>& grids);
45 double getWindowSize() const { return gi1d.getWindowSize(); }
46
47 const std::string toString() const;
48
49 private:
50 static std::set<std::string> getParameters(const Config& cfg);
51
53 bool enable_grid_filtering = false;
54};
55
56} //end namespace
57
58#endif
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition Config.h:79
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition Date.h:87
A class to temporally resample grid objects.
Definition Grid1DInterpolator.h:39
double getWindowSize() const
Definition Grid1DInterpolator.h:46
A class to represent 2D Grids. Typical application as DEM or Landuse Model.
Definition Grid2DObject.h:42
This class is handled by a GridManager and performs grid filtering and temporal resampling.
Definition GridProcessor.h:38
static std::map< Date, Grid2DObject >::const_iterator seek(const Date &date, const std::map< Date, Grid2DObject > &grids, const bool &exact_match=false)
Search a list of grids for a specific date.
Definition GridProcessor.cc:60
double getWindowSize() const
Definition GridProcessor.h:45
static std::map< Date, Grid2DObject >::const_iterator seek_before(const Date &date, const std::map< Date, Grid2DObject > &grids)
Find a grid that is available right after a specific date.
Definition GridProcessor.cc:84
static std::map< Date, Grid2DObject >::const_iterator seek_after(const Date &date, const std::map< Date, Grid2DObject > &grids)
Find a grid that is available before a specific date.
Definition GridProcessor.cc:107
const std::string toString() const
Definition GridProcessor.cc:118
bool resample(const Date &date, const MeteoGrids::Parameters &parameter, const std::map< Date, Grid2DObject > &all_grids, Grid2DObject &resampled_grid)
This function forwards interpolation requests.
Definition GridProcessor.cc:46
Parameters
this enum provides names for possible meteogrids (from an ARPS file, etc)
Definition MeteoData.h:46
Definition Config.cc:34