radarlib  1.4.6
OdimH5v20::MetadataGroup Class Reference

Attribute (odim metadata) group. More...

#include <radarlib/odimh5v20_metadata.hpp>

Public Member Functions

 MetadataGroup (H5::Group *group)
 Create a new metadata group linking it to a HDF5 group object. More...
 
int getCount ()
 Get che number of attributes in the group. More...
 
bool exists (const char *name)
 Check if an attribute with the given name exists (name is case sensitive) More...
 
void remove (const char *name)
 Delete the attribute with the given name (name is case sensitive) More...
 
H5::Attribute * getH5Attribute (const char *name, bool mandatory=false)
 Get pointer to the HDF5 attribute object associated to an attribute. More...
 
void set (const char *name, bool value)
 Set or create an attribute with the given boolean value. More...
 
void set (const char *name, char value)
 Set or create an attribute with the given 8 bit signed value. More...
 
void set (const char *name, unsigned char value)
 Set or create an attribute with the given 8 bit unsigned value. More...
 
void set (const char *name, short value)
 Set or create an attribute with the given 16 bit signed value. More...
 
void set (const char *name, unsigned short value)
 Set or create an attribute with the given 16 bit unsigned value. More...
 
void set (const char *name, int value)
 Set or create an attribute with the given 32 bit signed value. More...
 
void set (const char *name, unsigned int value)
 Set or create an attribute with the given 32 bit unsigned value. More...
 
void set (const char *name, int64_t value)
 Set or create an attribute with the given 64 bit signed value. More...
 
void set (const char *name, float value)
 Set or create an attribute with the given 32 bit floating point value. More...
 
void set (const char *name, double value)
 Set or create an attribute with the given 64 bit floating point value. More...
 
void set (const char *name, const char *value)
 Set or create an attribute with the given string value. More...
 
void set (const char *name, const std::string &value)
 Set or create an attribute with the given std::string value. More...
 
void set (const char *name, const std::vector< bool > &value)
 Set or create a sequence attribute with the given boolean values. More...
 
void set (const char *name, const std::vector< char > &value)
 Set or create a sequence attribute with the given 8 bit signed values. More...
 
void set (const char *name, const std::vector< unsigned char > &value)
 Set or create a sequence attribute with the given 8 bit unsigned values. More...
 
void set (const char *name, const std::vector< short > &value)
 Set or create a sequence attribute with the given 16 bit signed values. More...
 
void set (const char *name, const std::vector< unsigned short > &value)
 Set or create a sequence attribute with the given 16 bit unsigned values. More...
 
void set (const char *name, const std::vector< int > &value)
 Set or create a sequence attribute with the given 32 bit signed values. More...
 
void set (const char *name, const std::vector< unsigned int > &value)
 Set or create a sequence attribute with the given 32 bit unsigned values. More...
 
void set (const char *name, const std::vector< int64_t > &value)
 Set or create a sequence attribute with the given 64 bit signed values. More...
 
void set (const char *name, const std::vector< float > &value, int precision=0)
 Set or create a sequence attribute with the given 32 bit floating point values. More...
 
void set (const char *name, const std::vector< double > &value, int precision=0)
 Set or create a sequence attribute with the given 64 bit floating point values. More...
 
void set (const char *name, const std::vector< char * > &value)
 Set or create a sequence attribute with the given string values. More...
 
void set (const char *name, const std::vector< std::string > &value)
 Set or create a sequence attribute with the given string values. More...
 
void set (const char *name, const std::vector< std::pair< short, short > > &value)
 Set or create a pairs sequence attribute with the given pairs of 16 bit signed values. More...
 
void set (const char *name, const std::vector< std::pair< int, int > > &value)
 Set or create a pairs sequence attribute with the given pairs of 32 bit signed values. More...
 
void set (const char *name, const std::vector< std::pair< int64_t, int64_t > > &value)
 Set or create a pairs sequence attribute with the given pairs of 64 bit signed values. More...
 
void set (const char *name, const std::vector< std::pair< float, float > > &value, int precision=0)
 Set or create a pairs sequence attribute with the given pairs of 32 bit floating point values. More...
 
void set (const char *name, const std::vector< std::pair< double, double > > &value, int precision=0)
 Set or create a pairs sequence attribute with the given pairs of 64 bit floating point values. More...
 
void set (const char *name, const std::vector< std::pair< std::string, std::string > > &value)
 Set or create a pairs sequence attribute with the given pairs of string values. More...
 
void set (const char *name, const std::vector< AZTimes > &value)
 Set or create a pairs sequence attribute with the given azimuth time pairs. More...
 
void set (const char *name, const std::vector< AZAngles > &value)
 Set or create a pairs sequence attribute with the given azimuth angles pairs. More...
 
void set (const char *name, const std::vector< AZAngles > &value, int precision)
 Set or create a pairs sequence attribute with the given azimuth angles pairs. More...
 
void set (const char *name, const VILHeights &value)
 Set or create a sequence attribute with the given integration layer height pair. More...
 
void set (const char *name, const std::vector< Angles > &value)
 Set or create a sequence attribute with the given elevation angles. More...
 
void set (const char *name, const std::vector< Angles > &value, int precision)
 Set or create a sequence attribute with the given elevation angles. More...
 
void set (const char *name, const std::vector< Arotation > &value)
 Set or create a sequence attribute with the given antenna rotation speeds. More...
 
void set (const char *name, const std::vector< Arotation > &value, int precision)
 Set or create a sequence attribute with the given antenna rotation speeds. More...
 
void set (const char *name, const std::vector< Nodes > &value)
 Set or create a sequence attribute with the given radar nodes. More...
 
void set (const char *name, const std::stringstream &value)
 Set or create a string attribute with the given string stream. More...
 
void set (const char *name, const std::ostringstream &value)
 Set or create a string attribute with the given output string stream. More...
 
bool getBool (const char *name)
 Get the value of a boolean attribute. More...
 
bool getBool (const char *name, bool value)
 Get the value of a boolean attribute. More...
 
char getChar (const char *name)
 Get the value of a 64 bit signed attribute converting it to 8bit signed value. More...
 
char getChar (const char *name, char value)
 Get the value of a 64 bit signed attribute converting it to 8bit signed value. More...
 
unsigned char getUChar (const char *name)
 Get the value of a 64 bit signed attribute converting it to 8 bit unsigned value. More...
 
unsigned char getUChar (const char *name, unsigned char value)
 Get the value of a 64 bit signed attribute converting it to 8 bit unsigned value. More...
 
short getShort (const char *name)
 Get the value of a 64 bit signed attribute converting it to 16 bit signed value. More...
 
short getShort (const char *name, short value)
 Get the value of a 64 bit signed attribute converting it to 16 bit signed value. More...
 
unsigned short getUShort (const char *name)
 Get the value of a 64 bit signed attribute converting it to 16 bit unsigned value. More...
 
unsigned short getUShort (const char *name, unsigned short value)
 Get the value of a 64 bit signed attribute converting it to 16 bit unsigned value. More...
 
int getInt (const char *name)
 Get the value of a 64 bit signed attribute converting it to 32 bit signed value. More...
 
int getInt (const char *name, int value)
 Get the value of a 64 bit signed attribute converting it to 32 bit signed value. More...
 
unsigned int getUInt (const char *name)
 Get the value of a 64 bit signed attribute converting it to 32 bit unsigned value. More...
 
unsigned int getUInt (const char *name, unsigned int value)
 Get the value of a 64 bit signed attribute converting it to 32 bit unsigned value. More...
 
int64_t getLong (const char *name)
 Get the value of a 64 bit signed attribute. More...
 
int64_t getLong (const char *name, int64_t value)
 Get the value of a 64 bit signed attribute. More...
 
time_t getTimeT (const char *name)
 Get the value of a 64 bit signed attribute converting it to time_t value. More...
 
time_t getTimeT (const char *name, time_t value)
 Get the value of a 64 bit signed attribute converting it to time_t value. More...
 
float getFloat (const char *name)
 Get the value of a 64 bit floating point attribute converting it to 32 bit floating point value. More...
 
float getFloat (const char *name, float value)
 Get the value of a 64 bit floating point attribute converting it to 32 bit floating point value. More...
 
double getDouble (const char *name)
 Get the value of a 64 bit floating point attribute. More...
 
double getDouble (const char *name, double value)
 Get the value of a 64 bit floating point attribute. More...
 
std::string getStr (const char *name)
 Get the value of a string attribute. More...
 
std::string getStr (const char *name, const std::string &value)
 Get the value of a string attribute. More...
 
std::vector< bool > getBools (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to boolean values. More...
 
std::vector< char > getChars (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 8 bit signed values. More...
 
std::vector< unsigned char > getUChars (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 8 bit unsigned values. More...
 
std::vector< short > getShorts (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 16 bit signed values. More...
 
std::vector< unsigned short > getUShorts (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 16 bit unsigned values. More...
 
std::vector< int > getInts (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 32 bit signed values. More...
 
std::vector< unsigned int > getUInts (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 32 bit unsigned values. More...
 
std::vector< int64_t > getLongs (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 64 bit signed values. More...
 
std::vector< time_t > getTimes (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to time_t values. More...
 
std::vector< float > getFloats (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 32 bit floating point values. More...
 
std::vector< double > getDoubles (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 64 bit floating point values. More...
 
std::vector< std::string > getStrings (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to string values. More...
 
std::vector< std::pair< short,
short > > 
getShortPairs (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 16 bit signed value pairs. More...
 
std::vector< std::pair< int,
int > > 
getIntPairs (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 32 bit signed value pairs. More...
 
std::vector< std::pair
< int64_t, int64_t > > 
getLongPairs (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 64 bit signed value pairs. More...
 
std::vector< std::pair< float,
float > > 
getFloatPairs (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 32 bit floating point value pairs. More...
 
std::vector< std::pair< double,
double > > 
getDoublePairs (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to 64 bit floating point value pairs. More...
 
const std::vector< std::pair
< std::string, std::string > > 
getStrPairs (const char *name, bool mandatory=false)
 Get the value of a sequence attribute converting it to string pairs. More...
 
std::vector< AZTimesgetAZTimes (const char *name)
 Get the value of a sequence attribute converting it to azimuth time pairs. More...
 
std::vector< AZAnglesgetAZAngles (const char *name)
 Get the value of a sequence attribute converting it to azimuth angle pairs. More...
 
VILHeights getVILHeights (const char *name)
 Get the value of a sequence attribute converting it to vertical height pairs. More...
 
std::vector< AnglesgetAngles (const char *name)
 Get the value of a sequence attribute converting it to elevation angle. More...
 
std::vector< ArotationgetArotation (const char *name)
 Get the value of a sequence attribute converting it to antenna rotation speed. More...
 
std::vector< NodesgetNodes (const char *name)
 Get the value of a sequence attribute converting it to radar nodes. More...
 
void import (MetadataGroup *group)
 Copy/write all attributes from the given group to this group. More...
 
void import (MetadataGroup *group, const std::set< std::string > &names)
 Copy/write all given attributes from the given group to this group. More...
 
H5::Group * getH5Object () const
 Get a reference to the underneath HDF5 group object. More...
 

Static Public Member Functions

static void setConventions (H5::Group *root)
 Static method to write OdimH5 Conventions attribute into given group. More...
 
static std::string getConventions (H5::Group *root)
 Static method to read OdimH5 Conventions attribute from a given group. More...
 

Detailed Description

Attribute (odim metadata) group.

This class represent an attribute collection used to represent odim What, Where and How attribute groups This is a generic class, no checks are made about name or values used for attributes. It is user responsibility to use this class to write and read attributes according to OdimH5 format

Constructor & Destructor Documentation

OdimH5v20::MetadataGroup::MetadataGroup ( H5::Group *  group)

Create a new metadata group linking it to a HDF5 group object.

Member Function Documentation

int OdimH5v20::MetadataGroup::getCount ( )

Get che number of attributes in the group.

bool OdimH5v20::MetadataGroup::exists ( const char *  name)

Check if an attribute with the given name exists (name is case sensitive)

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::remove ( const char *  name)

Delete the attribute with the given name (name is case sensitive)

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
H5::Attribute * OdimH5v20::MetadataGroup::getH5Attribute ( const char *  name,
bool  mandatory = false 
)

Get pointer to the HDF5 attribute object associated to an attribute.

Parameters
namethe attribute name
mandatoryif true, the attribute must be present in the group, otherwise a OdimH5MissingAttributeException will be raised
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true but the attribute is not present
void OdimH5v20::MetadataGroup::set ( const char *  name,
bool  value 
)

Set or create an attribute with the given boolean value.

Boolean values are store ad string values "True" or "False"

Parameters
namethe attribute name
valuethe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
Examples:
create_delete.cpp, create_odim_object.cpp, create_polar_volume.cpp, and write_attributes.cpp.
void OdimH5v20::MetadataGroup::set ( const char *  name,
char  value 
)

Set or create an attribute with the given 8 bit signed value.

Parameters
namethe attribute name
valuethe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
unsigned char  value 
)

Set or create an attribute with the given 8 bit unsigned value.

The value will be stored as a 64 bit signed value

Parameters
namethe attribute name
valuethe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
short  value 
)

Set or create an attribute with the given 16 bit signed value.

The value will be stored as a 64 bit signed value

Parameters
namethe attribute name
valuethe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
unsigned short  value 
)

Set or create an attribute with the given 16 bit unsigned value.

The value will be stored as a 64 bit signed value

Parameters
namethe attribute name
valuethe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
int  value 
)

Set or create an attribute with the given 32 bit signed value.

The value will be stored as a 64 bit signed value

Parameters
namethe attribute name
valuethe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
unsigned int  value 
)

Set or create an attribute with the given 32 bit unsigned value.

The value will be stored as a 64 bit signed value

Parameters
namethe attribute name
valuethe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
int64_t  value 
)

Set or create an attribute with the given 64 bit signed value.

OdimH5 format does not allow 64 bit unsigned values;

Parameters
namethe attribute name
valuethe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
float  value 
)

Set or create an attribute with the given 32 bit floating point value.

The value will be stored as a 64 bit floating point value

Parameters
namethe attribute name
valuethe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
double  value 
)

Set or create an attribute with the given 64 bit floating point value.

Parameters
namethe attribute name
valuethe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const char *  value 
)

Set or create an attribute with the given string value.

Parameters
namethe attribute name
valuethe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::string &  value 
)

Set or create an attribute with the given std::string value.

Parameters
namethe attribute name
valuethe value to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< bool > &  value 
)

Set or create a sequence attribute with the given boolean values.

Values are stored as a comma separated string

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< char > &  value 
)

Set or create a sequence attribute with the given 8 bit signed values.

Values are stored as a comma separated string

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< unsigned char > &  value 
)

Set or create a sequence attribute with the given 8 bit unsigned values.

Values are stored as a comma separated string

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< short > &  value 
)

Set or create a sequence attribute with the given 16 bit signed values.

Values are stored as a comma separated string

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< unsigned short > &  value 
)

Set or create a sequence attribute with the given 16 bit unsigned values.

Values are stored as a comma separated string

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< int > &  value 
)

Set or create a sequence attribute with the given 32 bit signed values.

Values are stored as a comma separated string

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< unsigned int > &  value 
)

Set or create a sequence attribute with the given 32 bit unsigned values.

Values are stored as a comma separated string

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< int64_t > &  value 
)

Set or create a sequence attribute with the given 64 bit signed values.

Values are stored as a comma separated string

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< float > &  value,
int  precision = 0 
)

Set or create a sequence attribute with the given 32 bit floating point values.

Values are stored as a comma separated string

Parameters
namethe attribute name
valuethe values to write
precisionthe precision to use while converting values to string
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< double > &  value,
int  precision = 0 
)

Set or create a sequence attribute with the given 64 bit floating point values.

Values are stored as a comma separated string

Parameters
namethe attribute name
valuethe values to write
precisionthe precision to use while converting values to string
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< char * > &  value 
)

Set or create a sequence attribute with the given string values.

Values are stored as a comma separated string Is use responsibility to remove commas from string values

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< std::string > &  value 
)

Set or create a sequence attribute with the given string values.

Values are stored as a comma separated string Is use responsibility to remove commas from string values

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< std::pair< short, short > > &  value 
)

Set or create a pairs sequence attribute with the given pairs of 16 bit signed values.

Pairs are stored as a comma separated string with pair values separated by ':'

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< std::pair< int, int > > &  value 
)

Set or create a pairs sequence attribute with the given pairs of 32 bit signed values.

Pairs are stored as a comma separated string with pair values separated by ':'

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< std::pair< int64_t, int64_t > > &  value 
)

Set or create a pairs sequence attribute with the given pairs of 64 bit signed values.

Pairs are stored as a comma separated string with pair values separated by ':'

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< std::pair< float, float > > &  value,
int  precision = 0 
)

Set or create a pairs sequence attribute with the given pairs of 32 bit floating point values.

Pairs are stored as a comma separated string with pair values separated by ':'

Parameters
namethe attribute name
valuethe values to write
precisionthe precision to use while converting value to strings
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< std::pair< double, double > > &  value,
int  precision = 0 
)

Set or create a pairs sequence attribute with the given pairs of 64 bit floating point values.

Pairs are stored as a comma separated string with pair values separated by ':'

Parameters
namethe attribute name
valuethe values to write
precisionthe precision to use while converting value to strings
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< std::pair< std::string, std::string > > &  value 
)

Set or create a pairs sequence attribute with the given pairs of string values.

Pairs are stored as a comma separated string with pair values separated by ':'

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< AZTimes > &  value 
)

Set or create a pairs sequence attribute with the given azimuth time pairs.

Pairs are stored as a comma separated string with pair values separated by ':' Azimuth times are stored according to OdimH5 format 'HHMMSS.sss'

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< AZAngles > &  value 
)

Set or create a pairs sequence attribute with the given azimuth angles pairs.

Pairs are stored as a comma separated string with pair values separated by ':' Pair values are stored with the default STL precision for double values.

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< AZAngles > &  value,
int  precision 
)

Set or create a pairs sequence attribute with the given azimuth angles pairs.

Pairs are stored as a comma separated string with pair values separated by ':' Pair values are stored with the given precision value.

Parameters
namethe attribute name
valuethe values to write
precisionthe precision to use while converting value to strings
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const VILHeights value 
)

Set or create a sequence attribute with the given integration layer height pair.

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< Angles > &  value 
)

Set or create a sequence attribute with the given elevation angles.

Values are separated by ':' Values are stored with the default STL precision for double values.

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< Angles > &  value,
int  precision 
)

Set or create a sequence attribute with the given elevation angles.

Values are separated by ':' Pair values are stored with the given precision value.

Parameters
namethe attribute name
valuethe values to write
precisionthe precision to use while converting value to strings
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< Arotation > &  value 
)

Set or create a sequence attribute with the given antenna rotation speeds.

Values are separated by ':' Values are stored with the default STL precision for double values.

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< Arotation > &  value,
int  precision 
)

Set or create a sequence attribute with the given antenna rotation speeds.

Values are separated by ':' Pair values are stored with the given precision value.

Parameters
namethe attribute name
valuethe values to write
precisionthe precision to use while converting value to strings
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::vector< Nodes > &  value 
)

Set or create a sequence attribute with the given radar nodes.

Values are separated by ':'

Parameters
namethe attribute name
valuethe values to write
Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::stringstream &  value 
)

Set or create a string attribute with the given string stream.

Exceptions
OdimH5Exceptionif an unexpected error occurs
void OdimH5v20::MetadataGroup::set ( const char *  name,
const std::ostringstream &  value 
)

Set or create a string attribute with the given output string stream.

Exceptions
OdimH5Exceptionif an unexpected error occurs
bool OdimH5v20::MetadataGroup::getBool ( const char *  name)

Get the value of a boolean attribute.

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
Examples:
read_attributes.cpp.
bool OdimH5v20::MetadataGroup::getBool ( const char *  name,
bool  value 
)

Get the value of a boolean attribute.

Parameters
namethe attribute name
valuethe default value to return if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
char OdimH5v20::MetadataGroup::getChar ( const char *  name)

Get the value of a 64 bit signed attribute converting it to 8bit signed value.

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
Examples:
read_attributes.cpp.
char OdimH5v20::MetadataGroup::getChar ( const char *  name,
char  value 
)

Get the value of a 64 bit signed attribute converting it to 8bit signed value.

Parameters
namethe attribute name
valuethe default value to return if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
unsigned char OdimH5v20::MetadataGroup::getUChar ( const char *  name)

Get the value of a 64 bit signed attribute converting it to 8 bit unsigned value.

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
Examples:
read_attributes.cpp.
unsigned char OdimH5v20::MetadataGroup::getUChar ( const char *  name,
unsigned char  value 
)

Get the value of a 64 bit signed attribute converting it to 8 bit unsigned value.

Parameters
namethe attribute name
valuethe default value to return if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
short OdimH5v20::MetadataGroup::getShort ( const char *  name)

Get the value of a 64 bit signed attribute converting it to 16 bit signed value.

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
Examples:
read_attributes.cpp.
short OdimH5v20::MetadataGroup::getShort ( const char *  name,
short  value 
)

Get the value of a 64 bit signed attribute converting it to 16 bit signed value.

Parameters
namethe attribute name
valuethe default value to return if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
unsigned short OdimH5v20::MetadataGroup::getUShort ( const char *  name)

Get the value of a 64 bit signed attribute converting it to 16 bit unsigned value.

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
Examples:
read_attributes.cpp.
unsigned short OdimH5v20::MetadataGroup::getUShort ( const char *  name,
unsigned short  value 
)

Get the value of a 64 bit signed attribute converting it to 16 bit unsigned value.

Parameters
namethe attribute name
valuethe default value to return if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
int OdimH5v20::MetadataGroup::getInt ( const char *  name)

Get the value of a 64 bit signed attribute converting it to 32 bit signed value.

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
Examples:
read_attributes.cpp.
int OdimH5v20::MetadataGroup::getInt ( const char *  name,
int  value 
)

Get the value of a 64 bit signed attribute converting it to 32 bit signed value.

Parameters
namethe attribute name
valuethe default value to return if attribute is not found
valuethe value to return if the attribute does not exists
Exceptions
OdimH5Exceptionif an unexpected error occurs
unsigned int OdimH5v20::MetadataGroup::getUInt ( const char *  name)

Get the value of a 64 bit signed attribute converting it to 32 bit unsigned value.

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
Examples:
read_attributes.cpp.
unsigned int OdimH5v20::MetadataGroup::getUInt ( const char *  name,
unsigned int  value 
)

Get the value of a 64 bit signed attribute converting it to 32 bit unsigned value.

Parameters
namethe attribute name
valuethe default value to return if attribute is not found
valuethe value to return if the attribute does not exists
Exceptions
OdimH5Exceptionif an unexpected error occurs
int64_t OdimH5v20::MetadataGroup::getLong ( const char *  name)

Get the value of a 64 bit signed attribute.

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
Examples:
read_attributes.cpp.
int64_t OdimH5v20::MetadataGroup::getLong ( const char *  name,
int64_t  value 
)

Get the value of a 64 bit signed attribute.

Parameters
namethe attribute name
valuethe default value to return if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
time_t OdimH5v20::MetadataGroup::getTimeT ( const char *  name)

Get the value of a 64 bit signed attribute converting it to time_t value.

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
time_t OdimH5v20::MetadataGroup::getTimeT ( const char *  name,
time_t  value 
)

Get the value of a 64 bit signed attribute converting it to time_t value.

Parameters
namethe attribute name
valuethe default value to return if attribute is not found
valuethe value to return if the attribute does not exists
Exceptions
OdimH5Exceptionif an unexpected error occurs
float OdimH5v20::MetadataGroup::getFloat ( const char *  name)

Get the value of a 64 bit floating point attribute converting it to 32 bit floating point value.

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
Examples:
read_attributes.cpp.
float OdimH5v20::MetadataGroup::getFloat ( const char *  name,
float  value 
)

Get the value of a 64 bit floating point attribute converting it to 32 bit floating point value.

Parameters
namethe attribute name
valuethe default value to return if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
double OdimH5v20::MetadataGroup::getDouble ( const char *  name)

Get the value of a 64 bit floating point attribute.

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
Examples:
read_attributes.cpp.
double OdimH5v20::MetadataGroup::getDouble ( const char *  name,
double  value 
)

Get the value of a 64 bit floating point attribute.

Parameters
namethe attribute name
valuethe default value to return if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
std::string OdimH5v20::MetadataGroup::getStr ( const char *  name)

Get the value of a string attribute.

Parameters
namethe attribute name
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif the attribue does not exists
Examples:
image-visitor.cpp, and read_attributes.cpp.
std::string OdimH5v20::MetadataGroup::getStr ( const char *  name,
const std::string &  value 
)

Get the value of a string attribute.

Parameters
namethe attribute name
valuethe default value to return if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
std::vector< bool > OdimH5v20::MetadataGroup::getBools ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to boolean values.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
OdimH5Exceptionif an unexpected error occurs
Examples:
read_attributes.cpp.
std::vector< char > OdimH5v20::MetadataGroup::getChars ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 8 bit signed values.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
OdimH5Exceptionif an unexpected error occurs
std::vector< unsigned char > OdimH5v20::MetadataGroup::getUChars ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 8 bit unsigned values.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
OdimH5Exceptionif an unexpected error occurs
std::vector< short > OdimH5v20::MetadataGroup::getShorts ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 16 bit signed values.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
OdimH5Exceptionif an unexpected error occurs
std::vector< unsigned short > OdimH5v20::MetadataGroup::getUShorts ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 16 bit unsigned values.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
OdimH5Exceptionif an unexpected error occurs
std::vector< int > OdimH5v20::MetadataGroup::getInts ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 32 bit signed values.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
Examples:
read_attributes.cpp.
std::vector< unsigned int > OdimH5v20::MetadataGroup::getUInts ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 32 bit unsigned values.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
std::vector< int64_t > OdimH5v20::MetadataGroup::getLongs ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 64 bit signed values.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
std::vector< time_t > OdimH5v20::MetadataGroup::getTimes ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to time_t values.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
std::vector< float > OdimH5v20::MetadataGroup::getFloats ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 32 bit floating point values.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
std::vector< double > OdimH5v20::MetadataGroup::getDoubles ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 64 bit floating point values.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
Examples:
read_attributes.cpp.
std::vector< std::string > OdimH5v20::MetadataGroup::getStrings ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to string values.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
Examples:
read_attributes.cpp.
std::vector< std::pair< short, short > > OdimH5v20::MetadataGroup::getShortPairs ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 16 bit signed value pairs.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
std::vector< std::pair< int, int > > OdimH5v20::MetadataGroup::getIntPairs ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 32 bit signed value pairs.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
std::vector< std::pair< int64_t, int64_t > > OdimH5v20::MetadataGroup::getLongPairs ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 64 bit signed value pairs.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
std::vector< std::pair< float, float > > OdimH5v20::MetadataGroup::getFloatPairs ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 32 bit floating point value pairs.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
Examples:
read_attributes.cpp.
std::vector< std::pair< double, double > > OdimH5v20::MetadataGroup::getDoublePairs ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to 64 bit floating point value pairs.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
const std::vector< std::pair< std::string, std::string > > OdimH5v20::MetadataGroup::getStrPairs ( const char *  name,
bool  mandatory = false 
)

Get the value of a sequence attribute converting it to string pairs.

Parameters
namethe attribute name
mandatorythrow exception if attribute is not found
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
std::vector< AZTimes > OdimH5v20::MetadataGroup::getAZTimes ( const char *  name)

Get the value of a sequence attribute converting it to azimuth time pairs.

Parameters
namethe attribute to read
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
Examples:
read_attributes.cpp.
std::vector< AZAngles > OdimH5v20::MetadataGroup::getAZAngles ( const char *  name)

Get the value of a sequence attribute converting it to azimuth angle pairs.

Parameters
namethe attribute to read
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
VILHeights OdimH5v20::MetadataGroup::getVILHeights ( const char *  name)

Get the value of a sequence attribute converting it to vertical height pairs.

Parameters
namethe attribute to read
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
std::vector< Angles > OdimH5v20::MetadataGroup::getAngles ( const char *  name)

Get the value of a sequence attribute converting it to elevation angle.

Parameters
namethe attribute to read
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
std::vector< Arotation > OdimH5v20::MetadataGroup::getArotation ( const char *  name)

Get the value of a sequence attribute converting it to antenna rotation speed.

Parameters
namethe attribute to read
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
std::vector< Nodes > OdimH5v20::MetadataGroup::getNodes ( const char *  name)

Get the value of a sequence attribute converting it to radar nodes.

Parameters
namethe attribute to read
Exceptions
OdimH5Exceptionif an unexpected error occurs
OdimH5MissingAttributeExceptionif mandatory is true and the attribue does not exists
OdimH5FormatExceptionif a conversion error occurred
void OdimH5v20::MetadataGroup::import ( MetadataGroup group)

Copy/write all attributes from the given group to this group.

Parameters
groupthe source group to copy from
Exceptions
OdimH5Exceptionif an unexpected error occurs
Examples:
copy_polar_volume_attributes.cpp, and image-visitor.cpp.
void OdimH5v20::MetadataGroup::import ( MetadataGroup group,
const std::set< std::string > &  names 
)

Copy/write all given attributes from the given group to this group.

Parameters
groupthe source group to copy from
namesattributes to copy
Exceptions
OdimH5Exceptionif an unexpected error occurs
H5::Group* OdimH5v20::MetadataGroup::getH5Object ( ) const

Get a reference to the underneath HDF5 group object.

static void OdimH5v20::MetadataGroup::setConventions ( H5::Group *  root)
static

Static method to write OdimH5 Conventions attribute into given group.

Exceptions
OdimH5Exceptionif an unexpected error occurs
static std::string OdimH5v20::MetadataGroup::getConventions ( H5::Group *  root)
static

Static method to read OdimH5 Conventions attribute from a given group.

Exceptions
OdimH5Exceptionif an unexpected error occurs

The documentation for this class was generated from the following files: