MI - Fimex
Classes | Typedefs | Functions | Variables
felt Namespace Reference

Classes

class  FeltField
 
class  FeltFile
 
class  FeltGridDefinition
 

Typedefs

typedef short int word
 A felt block "word" - 2 bytes. More...
 
typedef boost::shared_ptr< FeltGridDefinitionFeltGridDefinitionPtr
 

Functions

bool isUndefined (word w)
 
boost::array< float, 6 > gridParameters (int gridType, int xNum, int yNum, int a, int b, int c, int d, const std::vector< short int > &extraData)
 
std::string gridParametersToProjDefinition (int gridType, const boost::array< float, 6 > &gridPars)
 
std::ostreamcontentSummary (std::ostream &out, const FeltGridDefinition &grid)
 
template<typename T >
get (word w)
 
boost::posix_time::ptime parseTime (const word *data)
 
boost::posix_time::ptime parseTimeNoThrow (const word *data)
 

Variables

const size_t blockWords = 1024
 
const size_t blockSize = blockWords * sizeof(word)
 
const size_t offsetToContentDefinition = 2
 
const double PI = 3.1415926535897932384626433832795
 
const double EARTH_RADIUS = 6371000.
 

Typedef Documentation

typedef boost::shared_ptr<FeltGridDefinition> felt::FeltGridDefinitionPtr
typedef short int felt::word

A felt block "word" - 2 bytes.

Function Documentation

std::ostream& felt::contentSummary ( std::ostream out,
const FeltGridDefinition grid 
)
template<typename T >
T felt::get ( word  w)

References parseTime(), and parseTimeNoThrow().

boost::array<float, 6> felt::gridParameters ( int  gridType,
int  xNum,
int  yNum,
int  a,
int  b,
int  c,
int  d,
const std::vector< short int > &  extraData 
)

retrieve the 6 gridparameters from the felt-data

Parameters
gridTypeid of the grid, (header[8] < 1000) ? header[8] : (int) header[8] / 1000
xNumnumber of points in x-direction, header[9]
yNumnumber of points in x-direction, header[10]
aused for different depending on gridType, header[14]
bused for different depending on gridType, header[15]
cused for different depending on gridType, header[16]
dused for different depending on gridType, header[17]
extraDatadata at the end of the data-region, used for high resolution information (header[8] < 1000) ? 0 : header[8] % 1000
std::string felt::gridParametersToProjDefinition ( int  gridType,
const boost::array< float, 6 > &  gridPars 
)

convert the libmi-gridparameters to proj4 strings

Parameters
gridTypetype defining the projection (1..6)
gridParsarray containing libmi's six gridparameters
Returns
proj.4 string
bool felt::isUndefined ( word  w)
inline

Is the given word a "missing" value? This means that there exist no valid data for the given point

References BOOST_STATIC_ASSERT().

boost::posix_time::ptime felt::parseTime ( const word data)

Referenced by get().

boost::posix_time::ptime felt::parseTimeNoThrow ( const word data)

Referenced by get().

Variable Documentation

const size_t felt::blockSize = blockWords * sizeof(word)
const size_t felt::blockWords = 1024
const double felt::EARTH_RADIUS = 6371000.

earth-radius in m, taken from libmi rearth.f

const size_t felt::offsetToContentDefinition = 2
const double felt::PI = 3.1415926535897932384626433832795

mathematical pi