MI - Fimex
|
Typedefs | |
typedef boost::shared_ptr< CDMBorderSmoothing > | CDMBorderSmoothingPtr |
typedef boost::shared_ptr< CDMMerger > | CDMMergerPtr |
typedef boost::shared_ptr< CDMOverlay > | CDMOverlayPtr |
typedef boost::shared_ptr< Data > | DataPtr |
typedef boost::shared_ptr< Logger > | LoggerPtr |
typedef long | epoch_seconds |
typedef boost::shared_ptr< xmlXPathObject > | XPathObjPtr |
Enumerations | |
enum | CDMDataType { CDM_NAT = 0, CDM_CHAR, CDM_SHORT, CDM_INT, CDM_FLOAT, CDM_DOUBLE, CDM_STRING, CDM_UCHAR, CDM_USHORT, CDM_UINT, CDM_INT64, CDM_UINT64, CDM_STRINGS } |
Functions | |
MIFI_DEPRECATED (std::vector< CDMAttribute > projStringToAttributes(std::string projStr)) | |
convert a proj4 string to a list of CDMAttributes usable for CF-1.0 projection variable More... | |
MIFI_DEPRECATED (std::string attributesToProjString(const std::vector< CDMAttribute > &attrs)) | |
convert attributes of a projection-variable to a projString More... | |
CDMDataType | string2datatype (const std::string &s) |
translate float/string/... to the appropriate CDMDataType More... | |
std::string | datatype2string (CDMDataType type) |
boost::shared_array< float > | data2InterpolationArray (const DataPtr &inData, double badValue) |
DataPtr | interpolationArray2Data (CDMDataType newType, boost::shared_array< float > iData, size_t size, double badValue) |
boost::posix_time::ptime | getUniqueForecastReferenceTime (boost::shared_ptr< CDMReader > reader) |
std::vector< double > | getDataSliceInUnit (const boost::shared_ptr< CDMReader > &reader, const std::string &var, const std::string &unit, int unLimDimPos) |
std::size_t | estimateCDMDataSize (const CDM &cdm) |
bool | compareCDMVarShapes (const CDM &cdm1, const std::string &varName1, const CDM &cdm2, const std::string &varName2) |
std::string | findUniqueDimVarName (const CDM &cdm, std::string baseVar) |
void | generateProjectionCoordinates (boost::shared_ptr< CDMReader > &reader) |
std::ostream & | operator<< (std::ostream &out, CoordinateAxis ca) |
std::ostream & | operator<< (std::ostream &out, CoordinateAxis::AxisType t) |
std::ostream & | operator<< (std::ostream &out, const CoordinateSystem &p) |
std::vector< boost::shared_ptr< const CoordinateSystem > > | listCoordinateSystems (boost::shared_ptr< CDMReader > reader) |
void | enhanceVectorProperties (boost::shared_ptr< CDMReader > reader) |
MIFI_DEPRECATED (std::vector< boost::shared_ptr< const CoordinateSystem > > listCoordinateSystems(CDM &cdm)) | |
MIFI_DEPRECATED (std::vector< boost::shared_ptr< const CoordinateSystem > > listCoordinateSystems(const CDM &cdm)) | |
int | findBestHorizontalCoordinateSystems (bool withProjection, boost::shared_ptr< CDMReader > reader, std::map< std::string, boost::shared_ptr< const CoordinateSystem > > &systems, std::map< std::string, std::string > &variables, std::vector< std::string > &incompatibleVariables) |
std::ostream & | operator<< (std::ostream &out, const Projection &proj) |
std::string | replaceProj4Earthfigure (const std::string &proj4, const std::string &newEarthfigure) |
std::ostream & | operator<< (std::ostream &out, const VerticalTransformation &vt) |
DataPtr | createData (CDMDataType datatype, size_t length, double val=0) |
create a Data-pointer of the datatype More... | |
DataPtr | createData (size_t length, boost::shared_array< double > array) |
create a Data-pointer of type CDM_DOUBLE More... | |
DataPtr | createData (size_t length, boost::shared_array< float > array) |
create a Data-pointer of type CDM_FLOAT More... | |
DataPtr | createData (size_t length, boost::shared_array< int > array) |
create a Data-pointer of type CDM_INT More... | |
DataPtr | createData (size_t length, boost::shared_array< short > array) |
create a Data-pointer of type CDM_SHORT More... | |
DataPtr | createData (size_t length, boost::shared_array< char > array) |
create a Data-pointer of type CDM_CHAR More... | |
DataPtr | createData (size_t length, boost::shared_array< unsigned int > array) |
create a Data-pointer of type CDM_UINT More... | |
DataPtr | createData (size_t length, boost::shared_array< long long > array) |
create a Data-pointer of type CDM_INT64 More... | |
DataPtr | createData (size_t length, boost::shared_array< unsigned long long > array) |
create a Data-pointer of type CDM_UINT64 More... | |
DataPtr | createData (size_t length, boost::shared_array< unsigned short > array) |
create a Data-pointer of type CDM_USHORT More... | |
DataPtr | createData (size_t length, boost::shared_array< unsigned char > array) |
create a Data-pointer of type CDM_UCHAR More... | |
DataPtr | createData (size_t length, boost::shared_array< std::string > array) |
create a Data-pointer of type CDM_STRINGS More... | |
template<class InputIterator > | |
DataPtr | createData (CDMDataType datatype, InputIterator first, InputIterator last) |
create a Data-pointer of the datatype and fill with the data from the iterator More... | |
DataPtr | createDataSlice (CDMDataType datatype, const Data &data, size_t dataStartPos, size_t dataSize) |
create a one-dimensional dataslice from another Data object More... | |
std::ostream & | operator<< (std::ostream &os, const GribFileMessage &gfm) |
outputstream for a GribFileMessage More... | |
std::ostream & | operator<< (std::ostream &os, const GribFileIndex &gfm) |
outputstream for a GribFileIndex More... | |
GridDefinition::Orientation | gribGetGridOrientation (boost::shared_ptr< grib_handle > gh) |
unsigned long | gribStepUnits2seconds (const std::string &stepUnits) |
std::string | gribSeconds2stepUnits (unsigned long seconds) |
Logger::LogLevel | defaultLogLevel () |
void | defaultLogLevel (Logger::LogLevel) |
LoggerPtr | getLogger (const std::string &className) |
std::ostream & | operator<< (std::ostream &os, const SliceBuilder &sb) |
std::ostream & | operator<< (std::ostream &out, const FimexTime &fTime) |
minimum FimexTime More... | |
FimexTime | string2FimexTime (const std::string &str) throw (CDMException) |
void | handleUdUnitError (int unitErrCode, const std::string &message="") throw (UnitException) |
int | round (double num) |
std::string | trim (const std::string &str) |
template<class InputIterator > | |
std::string | join (InputIterator start, InputIterator end, std::string delim=",") |
template<typename InputIterator > | |
std::pair< typename std::iterator_traits< InputIterator >::difference_type, typename std::iterator_traits< InputIterator >::difference_type > | find_closest_distinct_elements (InputIterator start, InputIterator end, double x) |
template<typename InputIterator > | |
std::pair< typename std::iterator_traits< InputIterator >::difference_type, typename std::iterator_traits< InputIterator >::difference_type > | find_closest_neighbor_distinct_elements (InputIterator start, InputIterator end, double x) |
template<class InputIterator > | |
std::string | joinPtr (InputIterator start, InputIterator end, std::string delim=",") |
std::vector< std::string > | tokenize (const std::string &str, const std::string &delimiters=" ") |
std::string | string2lowerCase (const std::string &str) |
template<typename T > | |
std::string | type2string (T in) |
template<> | |
std::string | type2string< double > (double in) |
template<typename T > | |
T | string2type (std::string s) |
template<typename T > | |
T | normalizeLongitude180 (T in) |
epoch_seconds | posixTime2epochTime (const boost::posix_time::ptime &time) |
template<typename T > | |
std::vector< T > | tokenizeDotted (const std::string &str, const std::string &delimiter=",") throw (CDMException) |
template<typename C > | |
int | mifi_isnan (C x) |
void | scanFiles (std::vector< std::string > &files, const std::string &dir, int depth, const boost::regex ®exp, bool matchFileOnly) |
void | globFiles (std::vector< std::string > &files, const std::string &glob) |
template<typename T > | |
boost::shared_array< const T > | makeSharedArrayConst (const boost::shared_array< T > &sa) |
std::string | getXmlProp (const xmlNodePtr node, const std::string &attrName) |
std::string | getXmlName (const xmlNodePtr node) |
std::string | getXmlContent (const xmlNodePtr node) |
get all text-contents of the node or underlying nodes More... | |
typedef boost::shared_ptr<CDMBorderSmoothing> MetNoFimex::CDMBorderSmoothingPtr |
typedef boost::shared_ptr<CDMMerger> MetNoFimex::CDMMergerPtr |
typedef boost::shared_ptr<CDMOverlay> MetNoFimex::CDMOverlayPtr |
typedef boost::shared_ptr<Data> MetNoFimex::DataPtr |
typedef long MetNoFimex::epoch_seconds |
typedef boost::shared_ptr<Logger> MetNoFimex::LoggerPtr |
typedef boost::shared_ptr<xmlXPathObject> MetNoFimex::XPathObjPtr |
bool MetNoFimex::compareCDMVarShapes | ( | const CDM & | cdm1, |
const std::string & | varName1, | ||
const CDM & | cdm2, | ||
const std::string & | varName2 | ||
) |
check if the shapes of two variables (eventually belonging to two different CDMs) have the same sizes. Dimensions of size 1 are ignored.
Referenced by MetNoFimex::null_deleter::operator()().
DataPtr MetNoFimex::createData | ( | CDMDataType | datatype, |
size_t | length, | ||
double | val = 0 |
||
) |
create a Data-pointer of the datatype
datatype | |
length | of the data array |
val | default value for data elements, 0 by default |
Referenced by createData().
DataPtr MetNoFimex::createData | ( | size_t | length, |
boost::shared_array< double > | array | ||
) |
create a Data-pointer of type CDM_DOUBLE
length | of the data array |
array | the data array |
DataPtr MetNoFimex::createData | ( | size_t | length, |
boost::shared_array< float > | array | ||
) |
create a Data-pointer of type CDM_FLOAT
length | of the data array |
array | the data array |
DataPtr MetNoFimex::createData | ( | size_t | length, |
boost::shared_array< int > | array | ||
) |
create a Data-pointer of type CDM_INT
length | of the data array |
array | the data array |
DataPtr MetNoFimex::createData | ( | size_t | length, |
boost::shared_array< short > | array | ||
) |
create a Data-pointer of type CDM_SHORT
length | of the data array |
array | the data array |
DataPtr MetNoFimex::createData | ( | size_t | length, |
boost::shared_array< char > | array | ||
) |
create a Data-pointer of type CDM_CHAR
length | of the data array |
array | the data array |
DataPtr MetNoFimex::createData | ( | size_t | length, |
boost::shared_array< unsigned int > | array | ||
) |
create a Data-pointer of type CDM_UINT
length | of the data array |
array | the data array |
DataPtr MetNoFimex::createData | ( | size_t | length, |
boost::shared_array< long long > | array | ||
) |
create a Data-pointer of type CDM_INT64
length | of the data array |
array | the data array |
DataPtr MetNoFimex::createData | ( | size_t | length, |
boost::shared_array< unsigned long long > | array | ||
) |
create a Data-pointer of type CDM_UINT64
length | of the data array |
array | the data array |
DataPtr MetNoFimex::createData | ( | size_t | length, |
boost::shared_array< unsigned short > | array | ||
) |
create a Data-pointer of type CDM_USHORT
length | of the data array |
array | the data array |
DataPtr MetNoFimex::createData | ( | size_t | length, |
boost::shared_array< unsigned char > | array | ||
) |
create a Data-pointer of type CDM_UCHAR
length | of the data array |
array | the data array |
DataPtr MetNoFimex::createData | ( | size_t | length, |
boost::shared_array< std::string > | array | ||
) |
create a Data-pointer of type CDM_STRINGS
length | of the data array |
array | the data array |
DataPtr MetNoFimex::createData | ( | CDMDataType | datatype, |
InputIterator | first, | ||
InputIterator | last | ||
) |
create a Data-pointer of the datatype and fill with the data from the iterator
datatype | |
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 |
References CDM_CHAR, CDM_DOUBLE, CDM_FLOAT, CDM_INT, CDM_INT64, CDM_NAT, CDM_SHORT, CDM_UCHAR, CDM_UINT, CDM_UINT64, CDM_USHORT, std::copy(), createData(), and std::distance().
DataPtr MetNoFimex::createDataSlice | ( | CDMDataType | datatype, |
const Data & | data, | ||
size_t | dataStartPos, | ||
size_t | dataSize | ||
) |
create a one-dimensional dataslice from another Data object
datatype | of the return-data |
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 |
boost::shared_array<float> MetNoFimex::data2InterpolationArray | ( | const DataPtr & | inData, |
double | badValue | ||
) |
convert the data inplace to an array useful for interpolation (i.e. badValue->nan)
inData | |
badValue |
std::string MetNoFimex::datatype2string | ( | CDMDataType | type | ) |
Logger::LogLevel MetNoFimex::defaultLogLevel | ( | ) |
the defaultLogLevel can be used by the implemented logger to determine the minimum LogLevel. This value might be ignored/overwritten by a configuration within the implementation. It should be initialized in the main class.
void MetNoFimex::defaultLogLevel | ( | Logger::LogLevel | ) |
void MetNoFimex::enhanceVectorProperties | ( | boost::shared_ptr< CDMReader > | reader | ) |
set spatial-vector properties according to convention won't overwrite any existing spatial vector properties
reader |
Referenced by MetNoFimex::CoordinateSystem::~CoordinateSystem().
std::size_t MetNoFimex::estimateCDMDataSize | ( | const CDM & | cdm | ) |
return estimated size of CDM-data in bytes
Referenced by MetNoFimex::null_deleter::operator()().
std::pair<typename std::iterator_traits<InputIterator>::difference_type, typename std::iterator_traits<InputIterator>::difference_type> MetNoFimex::find_closest_distinct_elements | ( | InputIterator | start, |
InputIterator | end, | ||
double | x | ||
) |
Find closest distinct elements in an unordered list. The order of elements is not defined.
Except for the case where all elements are equal, it is always ensured that the neighbors are distinct.
start | |
end | |
x |
References distance().
Referenced by find_closest_neighbor_distinct_elements().
std::pair<typename std::iterator_traits<InputIterator>::difference_type, typename std::iterator_traits<InputIterator>::difference_type> MetNoFimex::find_closest_neighbor_distinct_elements | ( | InputIterator | start, |
InputIterator | end, | ||
double | x | ||
) |
Find closest distinct neighbor elements in an unordered list, with a <= x < b It might extrapolate if x is smaller than all elements (or x > all elements) and fall back to find_closest_distinct_elements()
Except for the case where all elements are equal, it is always ensured that the neighbors are distinct.
start | |
end | |
x |
References distance(), find_closest_distinct_elements(), and std::numeric_limits< _Tp >::max().
int MetNoFimex::findBestHorizontalCoordinateSystems | ( | bool | withProjection, |
boost::shared_ptr< CDMReader > | reader, | ||
std::map< std::string, boost::shared_ptr< const CoordinateSystem > > & | systems, | ||
std::map< std::string, std::string > & | variables, | ||
std::vector< std::string > & | incompatibleVariables | ||
) |
find all horizontal coordinate systems, either with or without projections, list the variables belonging to the coordinate systems and mention all incompatible variables with a coordinate system
withProjection | select only horizontal coordinatesystems either with (true) or without (false) projection |
reader | the CDMReader to search coordinate systems in, comparable to listCoordinateSystems() |
systems | Output of coordinateSystems (horizontalId -> system) |
variables | Output with all variables having a horizontal coordinate system |
incompatibleVariables | Output with a all variables which have a partial horizontal coordinate system which might interfere when changing dimensions |
Referenced by MetNoFimex::CoordinateSystem::~CoordinateSystem().
std::string MetNoFimex::findUniqueDimVarName | ( | const CDM & | cdm, |
std::string | baseVar | ||
) |
find a unique variable and dimension name, starting with baseVar
cdm | |
baseVar | the basic variable name |
Referenced by MetNoFimex::null_deleter::operator()().
void MetNoFimex::generateProjectionCoordinates | ( | boost::shared_ptr< CDMReader > & | reader | ) |
generate projection coordinates if they don't exist for a coordinate system
Referenced by MetNoFimex::null_deleter::operator()().
std::vector<double> MetNoFimex::getDataSliceInUnit | ( | const boost::shared_ptr< CDMReader > & | reader, |
const std::string & | var, | ||
const std::string & | unit, | ||
int | unLimDimPos | ||
) |
This is the same function as CDMReader::getScaledDataSliceInUnit, but it converts the data to a vector<double>.
reader | |
var | |
unit | |
unLimDimPos |
Referenced by MetNoFimex::null_deleter::operator()().
LoggerPtr MetNoFimex::getLogger | ( | const std::string & | className | ) |
Retrieve a logger for Fimex. It will use loggers in the following order, skipping to the next one if the current one is not available: 1) log4cxx 2) no/dummy logger
boost::posix_time::ptime MetNoFimex::getUniqueForecastReferenceTime | ( | boost::shared_ptr< CDMReader > | reader | ) |
Try to find the forecast reference time of the reader. This has currently only be implemented for CF-1.x.
reader | the CDMReader to check for the reference time |
CDMException | if eithern no reference time has been found, or if more than 1 different reference times have been found |
Referenced by MetNoFimex::null_deleter::operator()().
std::string MetNoFimex::getXmlContent | ( | const xmlNodePtr | node | ) |
get all text-contents of the node or underlying nodes
node | the xmlNodePtr or xmlNodePtr as list |
CDMException |
std::string MetNoFimex::getXmlName | ( | const xmlNodePtr | node | ) |
a memory-save form of xmlGetName
std::string MetNoFimex::getXmlProp | ( | const xmlNodePtr | node, |
const std::string & | attrName | ||
) |
a memory-save form of xmlGetProp
void MetNoFimex::globFiles | ( | std::vector< std::string > & | files, |
const std::string & | glob | ||
) |
Similar to scanFiles, but uses glob instead, with * matches everything within a file or directory-name, ? matches exactly one character (not /), and ** match everything even across multiple directories.
files | output list of files |
glob | the file/directory glob to match, glob-wildcards are *, ** and ? |
Referenced by mifi_isnan().
GridDefinition::Orientation MetNoFimex::gribGetGridOrientation | ( | boost::shared_ptr< grib_handle > | gh | ) |
get the orientation of the data
gh | grib-handle |
std::string MetNoFimex::gribSeconds2stepUnits | ( | unsigned long | seconds | ) |
find the largest unit covering the seconds, i.e. the opposite of gribStepUnits2seconds()
unsigned long MetNoFimex::gribStepUnits2seconds | ( | const std::string & | stepUnits | ) |
convert the stepUnits to seconds, i.e. D (day) = 60*60*24
void MetNoFimex::handleUdUnitError | ( | int | unitErrCode, |
const std::string & | message = "" |
||
) | |||
throw | ( | UnitException | |
) |
DataPtr MetNoFimex::interpolationArray2Data | ( | CDMDataType | newType, |
boost::shared_array< float > | iData, | ||
size_t | size, | ||
double | badValue | ||
) |
convert the data from an interpolation-array (with NaNs) to one used as DataPtr, e.g. correct datatype and badvalue/fillvalue
newType | |
iData | |
size | |
badValue |
std::string MetNoFimex::join | ( | InputIterator | start, |
InputIterator | end, | ||
std::string | delim = "," |
||
) |
Join values from an iterator to a string, using delimiter as separator.
start | |
end | |
delim | separator, default to "," |
References std::basic_ostringstream< _CharT, _Traits, _Alloc >::str().
std::string MetNoFimex::joinPtr | ( | InputIterator | start, |
InputIterator | end, | ||
std::string | delim = "," |
||
) |
Join values from an iterator of pointers to a string, using delimiter as separator.
start | |
end | |
delim | separator, default to "," |
References std::basic_ostringstream< _CharT, _Traits, _Alloc >::str(), string2lowerCase(), and tokenize().
std::vector<boost::shared_ptr<const CoordinateSystem> > MetNoFimex::listCoordinateSystems | ( | boost::shared_ptr< CDMReader > | reader | ) |
fetch all coordinate system from a MetNoFimex::CDMReader
reader | the data-source. Depending on the internal structure of the datasource, the source might be manipulated, i.e. the WRF-system is missing several variables. |
Referenced by mifi_cdm_reader::mifi_cdm_reader(), and MetNoFimex::CoordinateSystem::~CoordinateSystem().
boost::shared_array<const T> MetNoFimex::makeSharedArrayConst | ( | const boost::shared_array< T > & | sa | ) |
convert a shared_array<T> to a shared_array<const T> (which will be automatically possilbe in boost::shared_array 1.47)
MetNoFimex::MIFI_DEPRECATED | ( | std::vector< CDMAttribute > | projStringToAttributesstd::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=?
Referenced by MetNoFimex::CDMAttribute::getDataType(), and MetNoFimex::CoordinateSystem::~CoordinateSystem().
MetNoFimex::MIFI_DEPRECATED | ( | std::string | attributesToProjStringconst std::vector< CDMAttribute > &attrs | ) |
convert attributes of a projection-variable to a projString
attrs | attributes of the projection variable |
MetNoFimex::MIFI_DEPRECATED | ( | std::vector< boost::shared_ptr< const CoordinateSystem > > | listCoordinateSystemsCDM &cdm | ) |
fetch all coordinate system from a MetNoFimex::CDM
MetNoFimex::MIFI_DEPRECATED | ( | std::vector< boost::shared_ptr< const CoordinateSystem > > | listCoordinateSystemsconst CDM &cdm | ) |
fetch all coordinate system from a MetNoFimex::CDM
int MetNoFimex::mifi_isnan | ( | C | x | ) |
template to declare isnan function in c++
x |
References globFiles(), and scanFiles().
Referenced by MetNoFimex::ChangeMissingValue< IN, OUT >::operator()().
T MetNoFimex::normalizeLongitude180 | ( | T | in | ) |
normalize Longitude to be within [-180:180]
in | longitude in degree |
std::ostream& MetNoFimex::operator<< | ( | std::ostream & | out, |
CoordinateAxis | ca | ||
) |
Referenced by MetNoFimex::SliceBuilder::getMaxDimensionSizes(), MetNoFimex::GribFileIndex::getUrl(), MetNoFimex::FimexTime::operator<=(), MetNoFimex::Projection::Projection(), MetNoFimex::CoordinateAxis::setExplicit(), MetNoFimex::CoordinateSystem::~CoordinateSystem(), and MetNoFimex::VerticalTransformation::~VerticalTransformation().
std::ostream& MetNoFimex::operator<< | ( | std::ostream & | out, |
CoordinateAxis::AxisType | t | ||
) |
std::ostream& MetNoFimex::operator<< | ( | std::ostream & | out, |
const Projection & | proj | ||
) |
output-stream for projections, implemented using toString()
std::ostream& MetNoFimex::operator<< | ( | std::ostream & | out, |
const FimexTime & | fTime | ||
) |
minimum FimexTime
std::ostream& MetNoFimex::operator<< | ( | std::ostream & | os, |
const SliceBuilder & | sb | ||
) |
std::ostream& MetNoFimex::operator<< | ( | std::ostream & | out, |
const VerticalTransformation & | vt | ||
) |
std::ostream& MetNoFimex::operator<< | ( | std::ostream & | out, |
const CoordinateSystem & | p | ||
) |
output operator
std::ostream& MetNoFimex::operator<< | ( | std::ostream & | os, |
const GribFileMessage & | gfm | ||
) |
outputstream for a GribFileMessage
std::ostream& MetNoFimex::operator<< | ( | std::ostream & | os, |
const GribFileIndex & | gfm | ||
) |
outputstream for a GribFileIndex
epoch_seconds MetNoFimex::posixTime2epochTime | ( | const boost::posix_time::ptime & | time | ) |
convert a posixTime to seconds sinc 1970-01-01
time | time to convert |
std::string MetNoFimex::replaceProj4Earthfigure | ( | const std::string & | proj4, |
const std::string & | newEarthfigure | ||
) |
helper function to replace the earth figure of the given proj4 string with a new earth-figure
proj4 | original proj-string |
newEarthfigure | earth-figure in proj-format, e.g. +ellps=sphere +R=6371000 +towgs84=0,0,0 |
Referenced by MetNoFimex::Projection::Projection().
int MetNoFimex::round | ( | double | num | ) |
Round a double to integer.
void MetNoFimex::scanFiles | ( | std::vector< std::string > & | files, |
const std::string & | dir, | ||
int | depth, | ||
const boost::regex & | regexp, | ||
bool | matchFileOnly | ||
) |
Scan the filesystem for files matching the regexp. Can be used similar to 'glob' or 'find' commands. The files will be sorted alphabetically.
files | output list of files |
dir | the input directory |
depth | the maximum number of directories to search (-1 is indefinite) |
regexp | the regular expression to match the file or complete path |
matchFileOnly | if true, the regexp will match the file-part only, if false, the complete path (behind dir) will be matched. |
Referenced by mifi_isnan().
CDMDataType MetNoFimex::string2datatype | ( | const std::string & | s | ) |
translate float/string/... to the appropriate CDMDataType
FimexTime MetNoFimex::string2FimexTime | ( | const std::string & | str | ) | |
throw | ( | CDMException | |||
) |
Referenced by MetNoFimex::FimexTime::operator<=().
std::string MetNoFimex::string2lowerCase | ( | const std::string & | str | ) |
convert a string to lowercase
Referenced by joinPtr().
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
str | the string to tokenize |
delimiters | the delimiters between the tokens. That can be multiple delimiters, i.e. whitespace is " \t\n\r" |
Referenced by joinPtr(), and tokenizeDotted().
std::vector<T> MetNoFimex::tokenizeDotted | ( | const std::string & | str, |
const std::string & | delimiter = "," |
||
) | |||
throw | ( | CDMException | |
) |
convert a string with dots to a vector with type T
str | f.e. 3.5,4.5,...,17.5 |
delimiter | optional delimiter, defaults to , |
References std::vector< _Tp, _Alloc >::begin(), std::vector< _Tp, _Alloc >::end(), std::vector< _Tp, _Alloc >::push_back(), std::vector< _Tp, _Alloc >::size(), tokenize(), trim(), and type2string().
std::string MetNoFimex::trim | ( | const std::string & | str | ) |
std::string MetNoFimex::type2string | ( | T | in | ) |
convert a type (i.e. int, float) to string representation
References std::basic_ostringstream< _CharT, _Traits, _Alloc >::str(), and type2string< double >().
Referenced by tokenizeDotted().
std::string MetNoFimex::type2string< double > | ( | double | in | ) |
specialization for high prececision
Referenced by type2string().