RAVE
rave_types.h File Reference

Type definitions for RAVE. More...

Go to the source code of this file.

Classes

struct  PolarNavigationInfo
 Provides user with navigation information. More...
 
struct  PolarObservation
 
struct  PolarObservationLinkedList
 Linked list version of the PolarObservation. More...
 

Macros

#define RAVEIO_API_ODIM_VERSION   RaveIO_ODIM_Version_2_3
 

Typedefs

typedef enum RaveIO_ODIM_Version RaveIO_ODIM_Version
 The /Conventions version in a ODIM HDF5 file.
 
typedef enum RaveIO_ODIM_H5rad_Version RaveIO_ODIM_H5rad_Version
 The /what/version in a ODIM HDF5 file.
 
typedef enum RaveValueType RaveValueType
 Different value types.
 
typedef enum Rave_ObjectType Rave_ObjectType
 Object types that defines the /what/object in the ODIM format.
 
typedef enum Rave_ProductType Rave_ProductType
 Product types that defines the <datasetX>/what/product in the ODIM format.
 
typedef enum RaveDataType RaveDataType
 Different data types that are supported during transformation.
 
typedef enum RaveTransformationMethod RaveTransformationMethod
 Transformation methods.
 
typedef struct PolarNavigationInfo PolarNavigationInfo
 Provides user with navigation information.
 
typedef struct PolarObservation PolarObservation
 
typedef struct PolarObservationLinkedList PolarObservationLinkedList
 Linked list version of the PolarObservation.
 

Enumerations

enum  RaveIO_ODIM_Version {
  RaveIO_ODIM_Version_UNDEFINED = -1 , RaveIO_ODIM_Version_2_0 = 0 , RaveIO_ODIM_Version_2_1 = 1 , RaveIO_ODIM_Version_2_2 = 2 ,
  RaveIO_ODIM_Version_2_3 = 3 , RaveIO_ODIM_Version_2_4 = 4
}
 The /Conventions version in a ODIM HDF5 file. More...
 
enum  RaveIO_ODIM_H5rad_Version {
  RaveIO_ODIM_H5rad_Version_UNDEFINED = -1 , RaveIO_ODIM_H5rad_Version_2_0 = 0 , RaveIO_ODIM_H5rad_Version_2_1 = 1 , RaveIO_ODIM_H5rad_Version_2_2 = 2 ,
  RaveIO_ODIM_H5rad_Version_2_3 = 3 , RaveIO_ODIM_H5rad_Version_2_4 = 4
}
 The /what/version in a ODIM HDF5 file. More...
 
enum  RaveValueType { RaveValueType_UNDEFINED = -1 , RaveValueType_UNDETECT = 0 , RaveValueType_NODATA = 1 , RaveValueType_DATA = 2 }
 Different value types. More...
 
enum  Rave_ObjectType {
  Rave_ObjectType_UNDEFINED = -1 , Rave_ObjectType_PVOL = 0 , Rave_ObjectType_CVOL = 1 , Rave_ObjectType_SCAN ,
  Rave_ObjectType_RAY , Rave_ObjectType_AZIM , Rave_ObjectType_ELEV , Rave_ObjectType_IMAGE ,
  Rave_ObjectType_COMP , Rave_ObjectType_XSEC , Rave_ObjectType_VP , Rave_ObjectType_PIC ,
  Rave_ObjectType_ENDOFTYPES
}
 Object types that defines the /what/object in the ODIM format. More...
 
enum  Rave_ProductType {
  Rave_ProductType_UNDEFINED = -1 , Rave_ProductType_SCAN = 0 , Rave_ProductType_PPI , Rave_ProductType_CAPPI ,
  Rave_ProductType_PCAPPI , Rave_ProductType_ETOP , Rave_ProductType_MAX , Rave_ProductType_RR ,
  Rave_ProductType_VIL , Rave_ProductType_COMP , Rave_ProductType_VP , Rave_ProductType_RHI ,
  Rave_ProductType_XSEC , Rave_ProductType_VSP , Rave_ProductType_HSP , Rave_ProductType_RAY ,
  Rave_ProductType_AZIM , Rave_ProductType_QUAL , Rave_ProductType_PMAX , Rave_ProductType_SURF ,
  Rave_ProductType_EBASE , Rave_ProductType_ENDOFTYPES
}
 Product types that defines the <datasetX>/what/product in the ODIM format. More...
 
enum  RaveDataType {
  RaveDataType_UNDEFINED = -1 , RaveDataType_CHAR = 0 , RaveDataType_UCHAR , RaveDataType_SHORT ,
  RaveDataType_USHORT , RaveDataType_INT , RaveDataType_UINT , RaveDataType_LONG ,
  RaveDataType_ULONG , RaveDataType_FLOAT , RaveDataType_DOUBLE , RaveDataType_LAST
}
 Different data types that are supported during transformation. More...
 
enum  RaveTransformationMethod {
  NEAREST = 1 , BILINEAR , CUBIC , CRESSMAN ,
  UNIFORM , INVERSE
}
 Transformation methods. More...
 

Functions

int get_ravetype_size (RaveDataType type)
 Returns the size of the datatype.
 
Rave_ProductType RaveTypes_getProductTypeFromString (const char *name)
 Translates the string representation of the product type into the enum.
 
const char * RaveTypes_getStringFromProductType (Rave_ProductType type)
 Returns the string representation of the product type.
 
Rave_ObjectType RaveTypes_getObjectTypeFromString (const char *name)
 Translates the string representation of the object type into the enum.
 
const char * RaveTypes_getStringFromObjectType (Rave_ObjectType type)
 Returns the string representation of the object type.
 
void RaveTypes_FreePolarObservationLinkedList (PolarObservationLinkedList *obs)
 Deallocates this linked list and all its children.
 
PolarObservationRaveTypes_PolarObservationLinkedListToArray (PolarObservationLinkedList *obs, int *nritems)
 Creates an array of PolarObservations from a PolarObservationLinkedList.
 
PolarObservationRaveTypes_FilterPolarObservationDataValues (PolarObservation *observations, int nobservations, int *ndataobservations)
 Removes all items that are not data-values in the observation array.
 
void RaveTypes_SortPolarObservations (PolarObservation *observations, int nobservations)
 Sorts the array of observations.
 

Detailed Description

Type definitions for RAVE.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2009-12-15

Typedef Documentation

◆ PolarNavigationInfo

typedef struct PolarNavigationInfo PolarNavigationInfo

Provides user with navigation information.

◆ PolarObservationLinkedList

typedef struct PolarObservationLinkedList PolarObservationLinkedList

Linked list version of the PolarObservation.

◆ Rave_ObjectType

Object types that defines the /what/object in the ODIM format.

◆ Rave_ProductType

Product types that defines the <datasetX>/what/product in the ODIM format.

◆ RaveDataType

typedef enum RaveDataType RaveDataType

Different data types that are supported during transformation.

◆ RaveIO_ODIM_H5rad_Version

The /what/version in a ODIM HDF5 file.

◆ RaveIO_ODIM_Version

The /Conventions version in a ODIM HDF5 file.

◆ RaveTransformationMethod

Transformation methods.

◆ RaveValueType

Different value types.

When initializing a data field it is wise to always initiallize to nodata instead of undetect.

Enumeration Type Documentation

◆ Rave_ObjectType

Object types that defines the /what/object in the ODIM format.

Enumerator
Rave_ObjectType_PVOL 

Polar volume.

Rave_ObjectType_CVOL 

Cartesian volume.

Rave_ObjectType_SCAN 

Polar scan.

Rave_ObjectType_RAY 

Single polar ray.

Rave_ObjectType_AZIM 

Azimuthal object.

Rave_ObjectType_ELEV 

Elevational object.

Rave_ObjectType_IMAGE 

2-D cartesian image

Rave_ObjectType_COMP 

Cartesian composite image(s)

Rave_ObjectType_XSEC 

2-D vertical cross section(s)

Rave_ObjectType_VP 

1-D vertical profile

Rave_ObjectType_PIC 

Embedded graphical image.

Rave_ObjectType_ENDOFTYPES 

Last entry.

◆ Rave_ProductType

Product types that defines the <datasetX>/what/product in the ODIM format.

Enumerator
Rave_ProductType_UNDEFINED 

Undefined.

Rave_ProductType_SCAN 

A scan of polar data.

Rave_ProductType_PPI 

Plan position indicator.

Rave_ProductType_CAPPI 

Constant altitude PPI.

Rave_ProductType_PCAPPI 

Pseudo-CAPPI.

Rave_ProductType_ETOP 

Echo top.

Rave_ProductType_MAX 

Maximum.

Rave_ProductType_RR 

Accumulation.

Rave_ProductType_VIL 

Vertically integrated liquid water.

Rave_ProductType_COMP 

Composite.

Rave_ProductType_VP 

Vertical profile.

Rave_ProductType_RHI 

Range height indicator.

Rave_ProductType_XSEC 

Arbitrary vertical slice.

Rave_ProductType_VSP 

Vertical side panel.

Rave_ProductType_HSP 

Horizontal side panel.

Rave_ProductType_RAY 

Ray.

Rave_ProductType_AZIM 

Azimuthal type product.

Rave_ProductType_QUAL 

Quality metric.

Rave_ProductType_PMAX 

Pseudo-MAX.

Rave_ProductType_SURF 

Surface type.

Rave_ProductType_EBASE 

Echo base.

Rave_ProductType_ENDOFTYPES 

Last entry.

◆ RaveDataType

Different data types that are supported during transformation.

Enumerator
RaveDataType_UNDEFINED 

Undefined data type.

RaveDataType_CHAR 

char

RaveDataType_UCHAR 

unsigned char

RaveDataType_SHORT 

short

RaveDataType_USHORT 

unsigned short

RaveDataType_INT 

int

RaveDataType_UINT 

unisgned int

RaveDataType_LONG 

long

RaveDataType_ULONG 

unsigned long

RaveDataType_FLOAT 

float

RaveDataType_DOUBLE 

double

RaveDataType_LAST 

Always has to be at end and is not a real datatype.

◆ RaveIO_ODIM_H5rad_Version

The /what/version in a ODIM HDF5 file.

Enumerator
RaveIO_ODIM_H5rad_Version_UNDEFINED 

undefined

RaveIO_ODIM_H5rad_Version_2_0 

ODIM 2.0.

RaveIO_ODIM_H5rad_Version_2_1 

ODIM 2.1.

RaveIO_ODIM_H5rad_Version_2_2 

ODIM 2.2.

RaveIO_ODIM_H5rad_Version_2_3 

ODIM 2.3.

RaveIO_ODIM_H5rad_Version_2_4 

ODIM 2.4, The default version.

◆ RaveIO_ODIM_Version

The /Conventions version in a ODIM HDF5 file.

Enumerator
RaveIO_ODIM_Version_UNDEFINED 

Undefined.

RaveIO_ODIM_Version_2_0 

ODIM 2.0.

RaveIO_ODIM_Version_2_1 

ODIM 2.1.

RaveIO_ODIM_Version_2_2 

ODIM 2.2.

RaveIO_ODIM_Version_2_3 

ODIM 2.3.

RaveIO_ODIM_Version_2_4 

ODIM 2.4, The default version.

◆ RaveTransformationMethod

Transformation methods.

Enumerator
NEAREST 

Nearest.

BILINEAR 

Bilinear.

CUBIC 

Cubic.

CRESSMAN 

Cressman.

UNIFORM 

Uniform.

INVERSE 

Inverse.

◆ RaveValueType

Different value types.

When initializing a data field it is wise to always initiallize to nodata instead of undetect.

Enumerator
RaveValueType_UNDEFINED 

undefined, i.e.

non-existing, etc.

RaveValueType_UNDETECT 

undetect

RaveValueType_NODATA 

nodata

RaveValueType_DATA 

data

Function Documentation

◆ get_ravetype_size()

int get_ravetype_size ( RaveDataType type)

Returns the size of the datatype.

Parameters
[in]type- the rave data type
Returns
the size or -1 if size not can be determined

◆ RaveTypes_FilterPolarObservationDataValues()

PolarObservation * RaveTypes_FilterPolarObservationDataValues ( PolarObservation * observations,
int nobservations,
int * ndataobservations )

Removes all items that are not data-values in the observation array.

Parameters
[in]observations- the array to be filtered
[in]nobservations- number of observations
[out]ndataobservations- the number of returned observations containing data values
Returns
the data observations

◆ RaveTypes_FreePolarObservationLinkedList()

void RaveTypes_FreePolarObservationLinkedList ( PolarObservationLinkedList * obs)

Deallocates this linked list and all its children.

Parameters
[in]obs- the observation to release

◆ RaveTypes_getObjectTypeFromString()

Rave_ObjectType RaveTypes_getObjectTypeFromString ( const char * name)

Translates the string representation of the object type into the enum.

Parameters
[in]name- the string representation of the object type
Returns
a object type or UNDEFINED if not found.

◆ RaveTypes_getProductTypeFromString()

Rave_ProductType RaveTypes_getProductTypeFromString ( const char * name)

Translates the string representation of the product type into the enum.

Parameters
[in]name- the string representation of the product type
Returns
a product type or UNDEFINED if not found.

◆ RaveTypes_getStringFromObjectType()

const char * RaveTypes_getStringFromObjectType ( Rave_ObjectType type)

Returns the string representation of the object type.

Parameters
[in]type- the object type
Returns
the string representation or NULL if nothing could be found.

◆ RaveTypes_getStringFromProductType()

const char * RaveTypes_getStringFromProductType ( Rave_ProductType type)

Returns the string representation of the product type.

Parameters
[in]type- the product type
Returns
the string representation or NULL if nothing could be found.

◆ RaveTypes_PolarObservationLinkedListToArray()

PolarObservation * RaveTypes_PolarObservationLinkedListToArray ( PolarObservationLinkedList * obs,
int * nritems )

Creates an array of PolarObservations from a PolarObservationLinkedList.

Parameters
[in]obs- the linked list to be transformed into an array
[out]nritems- the number of items in the array
Returns
the array

◆ RaveTypes_SortPolarObservations()

void RaveTypes_SortPolarObservations ( PolarObservation * observations,
int nobservations )

Sorts the array of observations.

All observations that are not data will be places furthest down in the array.

Parameters
[in]observations- the observations to be sorted
[in]nobservations- number of observations to be sorted