Point-wise linear interpolation between grids.
This algorithm performs linear interpolation between available grids. The syntax is the same as for timeseries interpolations; for example:
#include <GridLinearResampling.h>
Public Member Functions | |
GridLinearResampling (const std::string &algoname, const std::string &i_parname, const double &dflt_window_size, const std::vector< std::pair< std::string, std::string > > &vecArgs) | |
Constructor for a grid resampling algorithm. More... | |
void | resample (const Date &date, const std::map< Date, Grid2DObject > &all_grids, Grid2DObject &resampled_grid) |
Perform temporal grid resampling. More... | |
std::string | toString () const |
Print this algorithm's properties to a stream. More... | |
Public Member Functions inherited from mio::GridResamplingAlgorithm | |
GridResamplingAlgorithm (const std::string &algorithm, const std::string &i_parname, const double &dflt_window_size, const std::vector< std::pair< std::string, std::string > > &) | |
Facade constructor for a generic grid resampling algorithm. More... | |
virtual | ~GridResamplingAlgorithm ()=default |
void | setWindowSize (const double &window_size) |
Set this algorithm's window size to something other than the default value. More... | |
virtual void | resample (const Date &date, const std::map< Date, Grid2DObject > &all_grids, Grid2DObject &resampled_grid)=0 |
virtual std::string | toString () const =0 |
Additional Inherited Members | |
Protected Attributes inherited from mio::GridResamplingAlgorithm | |
const std::string | algo |
const std::string | parname |
double | grid_window_size |
mio::GridLinearResampling::GridLinearResampling | ( | const std::string & | algoname, |
const std::string & | i_parname, | ||
const double & | dflt_window_size, | ||
const std::vector< std::pair< std::string, std::string > > & | vecArgs | ||
) |
Constructor for a grid resampling algorithm.
On initialization, a resampling object stores its user settings.
[in] | algoname | The current algorithm's semantic name. |
[in] | i_parname | The current meteo parameter's identifier. |
[in] | dflt_window_size | The default grid resampling window size. |
[in] | vecArgs | Vector of arguments (user settings) for this algorithm. |
|
virtual |
Perform temporal grid resampling.
This function performs the interpolation routine and returns a grid resampled to the desired date.
[in] | date | Date to resample the data to. |
[in] | all_grids | List of all grids available to this resampling algorithm, as well as their corresponding dates. |
[out] | resampled_grid | The temporally resampled grid. |
Implements mio::GridResamplingAlgorithm.
|
virtual |
Print this algorithm's properties to a stream.
Implements mio::GridResamplingAlgorithm.