code::DataRemapper< GridType > Class Template Reference

List of all members.

Detailed Description

template<class GridType>
class code::DataRemapper< GridType >

This class maps data in an input grid into the given output grid.

The remapper ought to be reused whenever you have commonly occuring grid-locations and spacings, as it caches previous computations.

Author:
Lakshman
Version:
Id
code_DataRemapper.h,v 1.11 2012/04/30 19:31:06 Valliappa.Lakshmanan Exp


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)


Constructor & Destructor Documentation

template<class GridType>
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.


Member Function Documentation

template<class GridType>
static std::string code::DataRemapper< GridType >::getGridIdentification ( const Angle g  )  [static]

template<class GridType>
static std::string code::DataRemapper< GridType >::getGridIdentification ( const Displacement g  )  [static]

template<class GridType>
static std::string code::DataRemapper< GridType >::getGridIdentification ( const Location g  )  [static]

template<class GridType>
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.

template<class GridType>
void code::DataRemapper< GridType >::prune ( const std::vector< GridType > &  outputs  ) 

Prunes the internal lookup tables and keeps only the provided output grid dimensions.

template<class GridType>
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.


Generated on Fri May 4 13:40:11 2012 for WDSS-IIw2 by  doxygen 1.4.7