The remapper ought to be reused whenever you have commonly occuring grid-locations and spacings, as it caches previous computations.
Public Member Functions | |
DataRemapper (bool interpolate=true, bool assign_points_outside_grid_to_unavailable=true) | |
Interpolation is done using a Cressman interpolation method (inverse-square-distance) if interpolate is turned on. | |
void | remap (const GridType &input, GridType &output) |
Remaps the data in the input grid onto the output grid. | |
void | prune (const std::vector< GridType > &outputs) |
Prunes the internal lookup tables and keeps only the provided output grid dimensions. | |
Static Public Member Functions | |
static std::string | getGridIdentification (const GridType &g) |
returns a grid identification string which is unique for all cartesian grids at the same geographic location and with the same grid spacing. | |
static std::string | getGridIdentification (const Location &g) |
static std::string | getGridIdentification (const Displacement &g) |
static std::string | getGridIdentification (const Angle &g) |
code::DataRemapper< GridType >::DataRemapper | ( | bool | interpolate = true , |
|
bool | assign_points_outside_grid_to_unavailable = true | |||
) |
Interpolation is done using a Cressman interpolation method (inverse-square-distance) if interpolate is turned on.
the second flag decides whether to set points outside this grid to DataUnavailable, or to simply leave those pixels alone.
static std::string code::DataRemapper< GridType >::getGridIdentification | ( | const Angle & | g | ) | [static] |
static std::string code::DataRemapper< GridType >::getGridIdentification | ( | const Displacement & | g | ) | [static] |
static std::string code::DataRemapper< GridType >::getGridIdentification | ( | const Location & | g | ) | [static] |
static std::string code::DataRemapper< GridType >::getGridIdentification | ( | const GridType & | g | ) | [static] |
returns a grid identification string which is unique for all cartesian grids at the same geographic location and with the same grid spacing.
void code::DataRemapper< GridType >::prune | ( | const std::vector< GridType > & | outputs | ) |
Prunes the internal lookup tables and keeps only the provided output grid dimensions.
void code::DataRemapper< GridType >::remap | ( | const GridType & | input, | |
GridType & | output | |||
) |
Remaps the data in the input grid onto the output grid.
The output grid should be sized and located (space-time-ref, spacing, etc.) appropriately.
If the assignEverything flag was set in the constructor, every pixel of the output grid receives a value, which will be Constants::MISSING_DATA for points outside the input grid. Otherwise, only points inside the input grid will be transferred. The remaining points of output grid remain unassigned.