RAVE
cartesianvolume.h File Reference

Defines the functions available when working with cartesian volumes. More...

#include "projection.h"
#include "rave_object.h"
#include "rave_types.h"
#include "raveobject_list.h"
#include "cartesian.h"

Go to the source code of this file.

Typedefs

typedef struct _CartesianVolume_t CartesianVolume_t
 Defines a Cartesian volume.
 

Functions

int CartesianVolume_setTime (CartesianVolume_t *cvol, const char *value)
 Sets the nominal time.
 
const char * CartesianVolume_getTime (CartesianVolume_t *cvol)
 Returns the nominal time.
 
int CartesianVolume_setDate (CartesianVolume_t *cvol, const char *value)
 Sets the nominal date.
 
const char * CartesianVolume_getDate (CartesianVolume_t *cvol)
 Returns the nominal date.
 
int CartesianVolume_setSource (CartesianVolume_t *cvol, const char *value)
 Sets the source.
 
const char * CartesianVolume_getSource (CartesianVolume_t *cvol)
 Returns the source.
 
int CartesianVolume_setObjectType (CartesianVolume_t *cvol, Rave_ObjectType type)
 Sets the object type this cartesian volume should represent.
 
Rave_ObjectType CartesianVolume_getObjectType (CartesianVolume_t *cvol)
 Returns the object type this cartesian volume represents.
 
void CartesianVolume_setProjection (CartesianVolume_t *cvol, Projection_t *projection)
 Sets the projection that defines this cartesian volume.
 
Projection_tCartesianVolume_getProjection (CartesianVolume_t *cvol)
 Returns a copy of the projection that is used for this cartesian volume.
 
const char * CartesianVolume_getProjectionString (CartesianVolume_t *cvol)
 Returns the projection string defining this cartesian volume.
 
void CartesianVolume_setXScale (CartesianVolume_t *cvol, double xscale)
 Sets the xscale.
 
double CartesianVolume_getXScale (CartesianVolume_t *cvol)
 Returns the xscale.
 
void CartesianVolume_setYScale (CartesianVolume_t *cvol, double yscale)
 Sets the yscale.
 
double CartesianVolume_getYScale (CartesianVolume_t *cvol)
 Returns the yscale.
 
void CartesianVolume_setZScale (CartesianVolume_t *cvol, double zscale)
 Sets the zscale.
 
double CartesianVolume_getZScale (CartesianVolume_t *cvol)
 Returns the zscale.
 
void CartesianVolume_setZStart (CartesianVolume_t *cvol, double zstart)
 Sets the zstart.
 
double CartesianVolume_getZStart (CartesianVolume_t *cvol)
 Returns the zstart.
 
long CartesianVolume_getXSize (CartesianVolume_t *cvol)
 Returns the xsize.
 
long CartesianVolume_getYSize (CartesianVolume_t *cvol)
 Returns the ysize.
 
long CartesianVolume_getZSize (CartesianVolume_t *cvol)
 Returns the zsize, should be same as number of images in volume.
 
void CartesianVolume_setAreaExtent (CartesianVolume_t *cvol, double llX, double llY, double urX, double urY)
 Sets the area extent for this cartesian product.
 
void CartesianVolume_getAreaExtent (CartesianVolume_t *cvol, double *llX, double *llY, double *urX, double *urY)
 Gets the area extent for this cartesian product.
 
int CartesianVolume_addImage (CartesianVolume_t *cvol, Cartesian_t *image)
 Adds a cartesian image to the volume.
 
Cartesian_tCartesianVolume_getImage (CartesianVolume_t *cvol, int index)
 Returns the image at given index.
 
int CartesianVolume_getNumberOfImages (CartesianVolume_t *cvol)
 Returns the number of images.
 
int CartesianVolume_addAttribute (CartesianVolume_t *cvol, RaveAttribute_t *attribute)
 Adds a rave attribute to the volume.
 
int CartesianVolume_addAttributeVersion (CartesianVolume_t *cvol, RaveAttribute_t *attribute, RaveIO_ODIM_Version version)
 Adds a rave attribute to the volume of specified version.
 
RaveAttribute_tCartesianVolume_getAttribute (CartesianVolume_t *cvol, const char *name)
 Returns the rave attribute that is named accordingly.
 
RaveAttribute_tCartesianVolume_getAttributeVersion (CartesianVolume_t *cvol, const char *name, RaveIO_ODIM_Version version)
 Returns the rave attribute that is named accordingly.
 
int CartesianVolume_hasAttribute (CartesianVolume_t *cvol, const char *name)
 Returns if the specified attribute exists in the how-attributes or not.
 
RaveList_tCartesianVolume_getAttributeNames (CartesianVolume_t *cvol)
 Returns a list of attribute names.
 
RaveList_tCartesianVolume_getAttributeNamesVersion (CartesianVolume_t *cvol, RaveIO_ODIM_Version version)
 Returns a list of attribute names for specified version.
 
RaveObjectList_tCartesianVolume_getAttributeValues (CartesianVolume_t *cvol)
 Returns a list of attribute values that should be stored for this volume.
 
RaveObjectList_tCartesianVolume_getAttributeValuesVersion (CartesianVolume_t *cvol, RaveIO_ODIM_Version version)
 Returns a list of attribute values in specified version for this volume.
 

Variables

RaveCoreObjectType CartesianVolume_TYPE
 Type definition to use when creating a rave object.
 

Detailed Description

Defines the functions available when working with cartesian volumes.

This object supports RAVE_OBJECT_CLONE.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2010-06-23

Typedef Documentation

◆ CartesianVolume_t

Defines a Cartesian volume.

Function Documentation

◆ CartesianVolume_addAttribute()

int CartesianVolume_addAttribute ( CartesianVolume_t * cvol,
RaveAttribute_t * attribute )

Adds a rave attribute to the volume.

what/date, what/time, what/source, where/lon, where/lat and where/height are handled specially and will be added to respective member instead of stored as attributes. what/date, what/time and what/source must be string. where/lon and where/lat must be double in degrees. where/height must be double in meters.

Parameters
[in]cvol- self
[in]attribute- the attribute
Returns
1 on success otherwise 0

◆ CartesianVolume_addAttributeVersion()

int CartesianVolume_addAttributeVersion ( CartesianVolume_t * cvol,
RaveAttribute_t * attribute,
RaveIO_ODIM_Version version )

Adds a rave attribute to the volume of specified version.

what/date, what/time, what/source, where/lon, where/lat and where/height are handled specially and will be added to respective member instead of stored as attributes. what/date, what/time and what/source must be string. where/lon and where/lat must be double in degrees. where/height must be double in meters. NOTE! This method is usually only used internally.

Parameters
[in]cvol- self
[in]attribute- the attribute
[in]version- the attribute version
Returns
1 on success otherwise 0

◆ CartesianVolume_addImage()

int CartesianVolume_addImage ( CartesianVolume_t * cvol,
Cartesian_t * image )

Adds a cartesian image to the volume.

The image will automatically be assigned the volumes projection.

Parameters
[in]cvol- self
[in]image- the cartesian image ®return 0 on failure, otherwise success

◆ CartesianVolume_getAreaExtent()

void CartesianVolume_getAreaExtent ( CartesianVolume_t * cvol,
double * llX,
double * llY,
double * urX,
double * urY )

Gets the area extent for this cartesian product.

Parameters
[in]cvol- self
[out]llX- lower left X position (may be NULL)
[out]llY- lower left Y position (may be NULL)
[out]urX- upper right X position (may be NULL)
[out]urY- upper right Y position (may be NULL)

◆ CartesianVolume_getAttribute()

RaveAttribute_t * CartesianVolume_getAttribute ( CartesianVolume_t * cvol,
const char * name )

Returns the rave attribute that is named accordingly.

Parameters
[in]pvol- self
[in]name- the name of the attribute
Returns
the attribute if found otherwise NULL

◆ CartesianVolume_getAttributeNames()

RaveList_t * CartesianVolume_getAttributeNames ( CartesianVolume_t * cvol)

Returns a list of attribute names.

Release with @ref RaveList_freeAndDestroy.

Parameters
[in]pvol- self
Returns
a list of attribute names

◆ CartesianVolume_getAttributeNamesVersion()

RaveList_t * CartesianVolume_getAttributeNamesVersion ( CartesianVolume_t * cvol,
RaveIO_ODIM_Version version )

Returns a list of attribute names for specified version.

Release with @ref RaveList_freeAndDestroy. NOTE! This method is usually only used internally.

Parameters
[in]pvol- self
[in]version- the attribute version
Returns
a list of attribute names

◆ CartesianVolume_getAttributeValues()

RaveObjectList_t * CartesianVolume_getAttributeValues ( CartesianVolume_t * cvol)

Returns a list of attribute values that should be stored for this volume.

Parameters
[in]pvol- self
Returns
a list of RaveAttributes.

◆ CartesianVolume_getAttributeValuesVersion()

RaveObjectList_t * CartesianVolume_getAttributeValuesVersion ( CartesianVolume_t * cvol,
RaveIO_ODIM_Version version )

Returns a list of attribute values in specified version for this volume.

NOTE! This method is usually only used internally.

Parameters
[in]cvol- self
[in]version- the attribute version
Returns
a list of RaveAttributes.

◆ CartesianVolume_getAttributeVersion()

RaveAttribute_t * CartesianVolume_getAttributeVersion ( CartesianVolume_t * cvol,
const char * name,
RaveIO_ODIM_Version version )

Returns the rave attribute that is named accordingly.

In specified version NOTE! This method is usually only used internally.

Parameters
[in]pvol- self
[in]name- the name of the attribute
[in]version- the attribute version
Returns
the attribute if found otherwise NULL

◆ CartesianVolume_getDate()

const char * CartesianVolume_getDate ( CartesianVolume_t * cvol)

Returns the nominal date.

Parameters
[in]cvol- self
Returns
the nominal time (or NULL if there is none)

◆ CartesianVolume_getImage()

Cartesian_t * CartesianVolume_getImage ( CartesianVolume_t * cvol,
int index )

Returns the image at given index.

Parameters
[in]cvol- the volume
[in]index- the index
Returns
the cartesian image at the specified index or NULL on failure.

◆ CartesianVolume_getNumberOfImages()

int CartesianVolume_getNumberOfImages ( CartesianVolume_t * cvol)

Returns the number of images.

Parameters
[in]cvol- the volume
Returns
-1 on failure, otherwise a value >= 0

◆ CartesianVolume_getObjectType()

Rave_ObjectType CartesianVolume_getObjectType ( CartesianVolume_t * cvol)

Returns the object type this cartesian volume represents.

Parameters
[in]cvol- self
Returns
the object type

◆ CartesianVolume_getProjection()

Projection_t * CartesianVolume_getProjection ( CartesianVolume_t * cvol)

Returns a copy of the projection that is used for this cartesian volume.

I.e. remember to release it.

Parameters
[in]cvol- self
Returns
a projection (or NULL if none is set)

◆ CartesianVolume_getProjectionString()

const char * CartesianVolume_getProjectionString ( CartesianVolume_t * cvol)

Returns the projection string defining this cartesian volume.

Parameters
[in]cvol- self
Returns
the projection string or NULL if none defined

◆ CartesianVolume_getSource()

const char * CartesianVolume_getSource ( CartesianVolume_t * cvol)

Returns the source.

Parameters
[in]cvol- self
Returns
the source or NULL if there is none

◆ CartesianVolume_getTime()

const char * CartesianVolume_getTime ( CartesianVolume_t * cvol)

Returns the nominal time.

Parameters
[in]cvol- self
Returns
the nominal time (or NULL if there is none)

◆ CartesianVolume_getXScale()

double CartesianVolume_getXScale ( CartesianVolume_t * cvol)

Returns the xscale.

Parameters
[in]cvol- self
Returns
the xscale

◆ CartesianVolume_getXSize()

long CartesianVolume_getXSize ( CartesianVolume_t * cvol)

Returns the xsize.

Parameters
[in]cvol- self
Returns
the xsize

◆ CartesianVolume_getYScale()

double CartesianVolume_getYScale ( CartesianVolume_t * cvol)

Returns the yscale.

Parameters
[in]cvol- self
Returns
the yscale

◆ CartesianVolume_getYSize()

long CartesianVolume_getYSize ( CartesianVolume_t * cvol)

Returns the ysize.

Parameters
[in]cvol- self
Returns
the ysize

◆ CartesianVolume_getZScale()

double CartesianVolume_getZScale ( CartesianVolume_t * cvol)

Returns the zscale.

Parameters
[in]cvol- self
Returns
the zscale

◆ CartesianVolume_getZSize()

long CartesianVolume_getZSize ( CartesianVolume_t * cvol)

Returns the zsize, should be same as number of images in volume.

Parameters
[in]cvol- self
Returns
the zsize

◆ CartesianVolume_getZStart()

double CartesianVolume_getZStart ( CartesianVolume_t * cvol)

Returns the zstart.

Parameters
[in]cvol- self
Returns
the zstart

◆ CartesianVolume_hasAttribute()

int CartesianVolume_hasAttribute ( CartesianVolume_t * cvol,
const char * name )

Returns if the specified attribute exists in the how-attributes or not.

Parameters
[in]cvol- self
[in]name- the name of the attribute
Returns
1 if it exists, otherwise 0

◆ CartesianVolume_setAreaExtent()

void CartesianVolume_setAreaExtent ( CartesianVolume_t * cvol,
double llX,
double llY,
double urX,
double urY )

Sets the area extent for this cartesian product.

Parameters
[in]cvol- self
[in]llX- lower left X position
[in]llY- lower left Y position
[in]urX- upper right X position
[in]urY- upper right Y position

◆ CartesianVolume_setDate()

int CartesianVolume_setDate ( CartesianVolume_t * cvol,
const char * value )

Sets the nominal date.

Parameters
[in]cvol- self
[in]value- the date in the format YYYYMMDD
Returns
1 on success, otherwise 0

◆ CartesianVolume_setObjectType()

int CartesianVolume_setObjectType ( CartesianVolume_t * cvol,
Rave_ObjectType type )

Sets the object type this cartesian volume should represent.

Parameters
[in]cvol- self
[in]type- the object type
Returns
1 if the specified object type is supported, otherwise 0

◆ CartesianVolume_setProjection()

void CartesianVolume_setProjection ( CartesianVolume_t * cvol,
Projection_t * projection )

Sets the projection that defines this cartesian volume.

Parameters
[in]cvol- self
[in]projection- the projection

◆ CartesianVolume_setSource()

int CartesianVolume_setSource ( CartesianVolume_t * cvol,
const char * value )

Sets the source.

Parameters
[in]cvol- self
[in]value- the source
Returns
1 on success, otherwise 0

◆ CartesianVolume_setTime()

int CartesianVolume_setTime ( CartesianVolume_t * cvol,
const char * value )

Sets the nominal time.

Parameters
[in]cvol- self
[in]value- the time in the format HHmmss
Returns
1 on success, otherwise 0

◆ CartesianVolume_setXScale()

void CartesianVolume_setXScale ( CartesianVolume_t * cvol,
double xscale )

Sets the xscale.

Parameters
[in]cvol- self
[in]xscale- the xscale

◆ CartesianVolume_setYScale()

void CartesianVolume_setYScale ( CartesianVolume_t * cvol,
double yscale )

Sets the yscale.

Parameters
[in]cvol- self
[in]yscale- the yscale

◆ CartesianVolume_setZScale()

void CartesianVolume_setZScale ( CartesianVolume_t * cvol,
double zscale )

Sets the zscale.

Parameters
[in]cvol- self
[in]zscale- the zscale

◆ CartesianVolume_setZStart()

void CartesianVolume_setZStart ( CartesianVolume_t * cvol,
double zstart )

Sets the zstart.

Parameters
[in]cvol- self
[in]zstart- the zstart

Variable Documentation

◆ CartesianVolume_TYPE

RaveCoreObjectType CartesianVolume_TYPE
extern

Type definition to use when creating a rave object.