MetNoFimex Namespace Reference


Classes

class  CachedInterpolation
class  CachedVectorReprojection
class  VariableDimensionCheck
class  VariableAttributeCheck
class  CDM
 Data structure of the Common Data Model. More...
class  CDMAttribute
class  CDMDimension
class  CDMException
class  CDMExtractor
class  CDMInterpolator
class  CDMReader
 Basic interface for CDM reading and manipulation classes. More...
class  CDMVariable
class  CDMWriter
class  Data
class  DataImpl
class  DataTypeChanger
class  FeltCDMReader
class  GribApiCDMWriter
class  NetCDF_CDMWriter
class  NetCDF_CF10_CDMReader
class  Null_CDMWriter
class  ReplaceStringObject
class  ReplaceStringTimeObject
class  XMLDoc

Typedefs

typedef boost::shared_ptr<
xmlXPathObject > 
XPathObjPtr

Enumerations

enum  CDMDataType {
  CDM_NAT = 0, CDM_CHAR, CDM_SHORT, CDM_INT,
  CDM_FLOAT, CDM_DOUBLE, CDM_STRING
}

Functions

std::vector< CDMAttributeprojStringToAttributes (std::string projStr)
 convert a proj4 string to a list of CDMAttributes usable for CF-1.0 projection variable
std::string attributesToProjString (const std::vector< CDMAttribute > &attrs)
 convert attributes of a projection-variable to a projString
CDMDataType string2datatype (const std::string &s)
 translate float/string/... to the appropriate CDMDataType
std::string datatype2string (CDMDataType type)
boost::shared_ptr< DatacreateData (CDMDataType datatype, size_t length) throw (CDMException)
 create a Data-pointer of the datatype
boost::shared_ptr< DatacreateDataSlice (CDMDataType datatype, const Data &data, size_t dataStartPos, size_t dataSize) throw (CDMException)
 create a dataslice from another Data object
template<>
const boost::shared_array<
char > 
constConvertArrayType (const boost::shared_array< char > &inData, long length)
template<>
const boost::shared_array<
short > 
constConvertArrayType (const boost::shared_array< short > &inData, long length)
template<>
const boost::shared_array<
int > 
constConvertArrayType (const boost::shared_array< int > &inData, long length)
template<>
const boost::shared_array<
float > 
constConvertArrayType (const boost::shared_array< float > &inData, long length)
template<>
const boost::shared_array<
double > 
constConvertArrayType (const boost::shared_array< double > &inData, long length)
template<typename T1, typename T2>
boost::shared_array< T1 > duplicateArrayType (const boost::shared_array< T2 > &inData, long length)
 create a new shared array with a different type using static_cast
template<typename T1, typename T2>
const boost::shared_array<
T1 > 
constConvertArrayType (const boost::shared_array< T2 > &inData, long length)
 return a shared array of this data, possibly pointer to internal data
template<class InputIterator>
boost::shared_ptr< DatacreateData (CDMDataType datatype, size_t length, InputIterator first, InputIterator last) throw (CDMException)
 create a Data-pointer of the datatype and fill with the data from the iterator
template<typename C>
void recursiveCopyMultiDimData (C **orgData, C **newData, const std::vector< size_t > &orgDimSize, const std::vector< size_t > &orgSliceSize, const std::vector< size_t > &newStart, const std::vector< size_t > &newSize, size_t currentDim)
template<typename T1, typename T2>
boost::shared_array< T1 > convertArrayType (const boost::shared_array< T2 > &inData, size_t length, double oldFill, double oldScale, double oldOffset, double newFill, double newScale, double newOffset)
NcType cdmDataType2ncType (CDMDataType dt)
CDMDataType ncType2cdmDataType (NcType dt)
boost::shared_ptr< DatancValues2Data (NcValues *values, NcType dt, size_t length)
std::ostreamoperator<< (std::ostream &s, const ReplaceStringTimeObject &rsto)
string uterror2string (int errorcode)
std::string string2lowerCase (const std::string &str)
std::vector< std::stringtokenize (const std::string &str, const std::string &delimiters)
template<typename T>
std::string type2string (T in)
template<typename T>
string2type (std::string s)
std::string getXmlProp (const xmlNodePtr node, const std::string &attrName)
std::string getXmlName (const xmlNodePtr node)

Variables

const int EARTH_RADIUS_M = 6371000
const int DEBUG = 0


Typedef Documentation

typedef boost::shared_ptr<xmlXPathObject> MetNoFimex::XPathObjPtr
 


Enumeration Type Documentation

enum MetNoFimex::CDMDataType
 

Enumerator:
CDM_NAT 
CDM_CHAR 
CDM_SHORT 
CDM_INT 
CDM_FLOAT 
CDM_DOUBLE 
CDM_STRING 


Function Documentation

std::string MetNoFimex::attributesToProjString const std::vector< CDMAttribute > &  attrs  ) 
 

convert attributes of a projection-variable to a projString

Parameters:
attrs attributes of the projection variable
Returns:
proj4 string

NcType MetNoFimex::cdmDataType2ncType CDMDataType  dt  ) 
 

conversion from CDMDataType to NcType

template<typename T1, typename T2>
const boost::shared_array< T1 > MetNoFimex::constConvertArrayType const boost::shared_array< T2 > &  inData,
long  length
 

return a shared array of this data, possibly pointer to internal data

Parameters:
inData original data
length length of original data array

template<>
const boost::shared_array<double> MetNoFimex::constConvertArrayType const boost::shared_array< double > &  inData,
long  length
 

template<>
const boost::shared_array<float> MetNoFimex::constConvertArrayType const boost::shared_array< float > &  inData,
long  length
 

template<>
const boost::shared_array<int> MetNoFimex::constConvertArrayType const boost::shared_array< int > &  inData,
long  length
 

template<>
const boost::shared_array<short> MetNoFimex::constConvertArrayType const boost::shared_array< short > &  inData,
long  length
 

template<>
const boost::shared_array<char> MetNoFimex::constConvertArrayType const boost::shared_array< char > &  inData,
long  length
 

template<typename T1, typename T2>
boost::shared_array<T1> MetNoFimex::convertArrayType const boost::shared_array< T2 > &  inData,
size_t  length,
double  oldFill,
double  oldScale,
double  oldOffset,
double  newFill,
double  newScale,
double  newOffset
 

template<class InputIterator>
boost::shared_ptr< Data > MetNoFimex::createData CDMDataType  datatype,
size_t  length,
InputIterator  first,
InputIterator  last
throw (CDMException)
 

create a Data-pointer of the datatype and fill with the data from the iterator

Parameters:
datatype 
size_t length of the data array
first start of container containing the data to fill the array with
last end (excluded) of the container containing the data to fill the array with
Returns:
Base-Class ptr of the DataImpl belonging to the datatype

boost::shared_ptr< Data > MetNoFimex::createData CDMDataType  datatype,
size_t  length
throw (CDMException)
 

create a Data-pointer of the datatype

Parameters:
datatype 
size_t length of the data array
Returns:
Base-Class ptr of the DataImpl belonging to the datatype

boost::shared_ptr< Data > MetNoFimex::createDataSlice CDMDataType  datatype,
const Data &  data,
size_t  dataStartPos,
size_t  dataSize
throw (CDMException)
 

create a dataslice from another Data object

Parameters:
datatype 
data the data to read the values from, should be convertible data-format
dataStartPos the first element of data to fetch
dataSize the size of the data

std::string MetNoFimex::datatype2string CDMDataType  type  ) 
 

template<typename T1, typename T2>
boost::shared_array< T1 > MetNoFimex::duplicateArrayType const boost::shared_array< T2 > &  inData,
long  length
 

create a new shared array with a different type using static_cast

Parameters:
inData original data
length length of original data array

std::string MetNoFimex::getXmlName const xmlNodePtr  node  ) 
 

a memory-save form of xmlGetProp

Returns:
a string of the attribute, "" if attribute doesn't exist

std::string MetNoFimex::getXmlProp const xmlNodePtr  node,
const std::string attrName
 

a memory-save form of xmlGetProp

Returns:
a string of the attribute, "" if attribute doesn't exist

CDMDataType MetNoFimex::ncType2cdmDataType NcType  dt  ) 
 

conversion from NcType to CDMDataType

boost::shared_ptr< Data > MetNoFimex::ncValues2Data NcValues *  values,
NcType  dt,
size_t  length
 

convert ncValues to a Data pointer

Warning:
: the data belonging to values will be freed within this function or with the shared_array. Do not free the values otherwise!

std::ostream& MetNoFimex::operator<< std::ostream s,
const ReplaceStringTimeObject &  rsto
 

std::vector< CDMAttribute > MetNoFimex::projStringToAttributes std::string  projStr  ) 
 

convert a proj4 string to a list of CDMAttributes usable for CF-1.0 projection variable

currently, projStrings of the form +proj=[stere] +lat_0=? +lon_0=? +lat_ts=?

template<typename C>
void MetNoFimex::recursiveCopyMultiDimData C **  orgData,
C **  newData,
const std::vector< size_t > &  orgDimSize,
const std::vector< size_t > &  orgSliceSize,
const std::vector< size_t > &  newStart,
const std::vector< size_t > &  newSize,
size_t  currentDim
 

recursively copy data by moving the newData and orgData pointers forward and copy the data at the current position

it's assumed that the first dim in the vector is the fastest moving (fortran like)

Parameters:
orgData pointer to the current postion of the original array
newData pointer to the current position of the new array the original dimensions of orgData helper-array with orgSliceSize[0] = 1; orgSliceSize[n] = orgDimSize[n] * orgSliceSize[n-1] the start positions in the new data the dimensions of the newData the dimension currently under work, should be between (orgData.size()-1) and 0

CDMDataType MetNoFimex::string2datatype const std::string s  ) 
 

translate float/string/... to the appropriate CDMDataType

std::string MetNoFimex::string2lowerCase const std::string str  ) 
 

convert a string to lowercase

template<typename T>
T MetNoFimex::string2type std::string  s  ) 
 

std::vector< std::string > MetNoFimex::tokenize const std::string str,
const std::string delimiters = " "
 

Tokenize a string by a delimiter. This function will automaticall remove empty strings at the beginning or anywhere inside the string.

This function has been derived from http://www.oopweb.com/CPP/Documents/CPPHOWTO/Volume/C++Programming-HOWTO-7.html

Parameters:
str the string to tokenize
delimiters the delimiters between the tokens
Returns:
vector of tokens

template<typename T>
std::string MetNoFimex::type2string in  ) 
 

convert a type (i.e. int, float) to string representation

string MetNoFimex::uterror2string int  errorcode  ) 
 


Variable Documentation

const int MetNoFimex::DEBUG = 0
 

const int MetNoFimex::EARTH_RADIUS_M = 6371000
 


Generated on Thu Jun 5 14:58:24 2008 for MI - Fimex by  doxygen 1.4.6