RAVE
cartesiancomposite.c File Reference

Defines the functions available when creating composites from cartesian products. More...

#include "cartesiancomposite.h"
#include "cartesianparam.h"
#include "cartesian.h"
#include "projection_pipeline.h"
#include "raveobject_list.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include "rave_datetime.h"
#include <string.h>
#include "raveobject_hashtable.h"

Classes

struct  _CartesianComposite_t
 Represents the cartesian composite generator. More...
 

Macros

#define DISTANCE_TO_RADAR_HOW_TASK   "se.smhi.composite.distance.radar"
 The name of the task for specifying distance to radar.
 

Functions

int CartesianComposite_add (CartesianComposite_t *self, Cartesian_t *o)
 Adds a cartesian product to the cartesian composite generator.
 
int CartesianComposite_getNumberOfObjects (CartesianComposite_t *self)
 Returns the number of objects this composite will process.
 
Cartesian_tCartesianComposite_get (CartesianComposite_t *self, int index)
 Return the object at position index.
 
int CartesianComposite_setMethod (CartesianComposite_t *self, CartesianCompositeSelectionMethod_t method)
 Sets the selection method to use.
 
CartesianCompositeSelectionMethod_t CartesianComposite_getMethod (CartesianComposite_t *self)
 Returns the currently selection method.
 
int CartesianComposite_setDistanceField (CartesianComposite_t *self, const char *fieldname)
 Sets the distance field to use when executing the DISTANCE selection method.
 
const char * CartesianComposite_getDistanceField (CartesianComposite_t *self)
 Returns the quality field name (how/task) for the distance field to use when executing the DISTANCE selection method.
 
int CartesianComposite_setTime (CartesianComposite_t *self, const char *value)
 Sets the nominal time.
 
const char * CartesianComposite_getTime (CartesianComposite_t *self)
 Returns the nominal time.
 
int CartesianComposite_setDate (CartesianComposite_t *self, const char *value)
 Sets the nominal date.
 
const char * CartesianComposite_getDate (CartesianComposite_t *self)
 Returns the nominal date.
 
int CartesianComposite_setQuantity (CartesianComposite_t *self, const char *quantity)
 Sets the quantity.
 
const char * CartesianComposite_getQuantity (CartesianComposite_t *self)
 Returns the quantity (default DBZH)
 
void CartesianComposite_setGain (CartesianComposite_t *self, double gain)
 Sets the gain.
 
double CartesianComposite_getGain (CartesianComposite_t *self)
 Returns the gain.
 
void CartesianComposite_setOffset (CartesianComposite_t *self, double offset)
 Sets the offset.
 
double CartesianComposite_getOffset (CartesianComposite_t *self)
 Returns the offset.
 
void CartesianComposite_setNodata (CartesianComposite_t *self, double nodata)
 Sets the nodata.
 
double CartesianComposite_getNodata (CartesianComposite_t *self)
 Returns the nodata.
 
void CartesianComposite_setUndetect (CartesianComposite_t *self, double undetect)
 Sets the undetect.
 
double CartesianComposite_getUndetect (CartesianComposite_t *self)
 Returns the undetect.
 
Cartesian_tCartesianComposite_nearest (CartesianComposite_t *self, Area_t *area)
 Generates a composite according to the nearest radar principle.
 

Variables

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

Detailed Description

Defines the functions available when creating composites from cartesian products.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2013-10-01

Macro Definition Documentation

◆ DISTANCE_TO_RADAR_HOW_TASK

#define DISTANCE_TO_RADAR_HOW_TASK   "se.smhi.composite.distance.radar"

The name of the task for specifying distance to radar.

Function Documentation

◆ CartesianComposite_add()

int CartesianComposite_add ( CartesianComposite_t * self,
Cartesian_t * object )

Adds a cartesian product to the cartesian composite generator.

Parameters
[in]self- self
[in]object- the item to be added to the composite
Returns
1 on success, otherwise 0

◆ CartesianComposite_get()

Cartesian_t * CartesianComposite_get ( CartesianComposite_t * self,
int index )

Return the object at position index.

Parameters
[in]self- self
[in]index- the index, should be >= 0 and < getNumberOfObjects
Returns
the object or NULL if outside range

◆ CartesianComposite_getDate()

const char * CartesianComposite_getDate ( CartesianComposite_t * self)

Returns the nominal date.

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

◆ CartesianComposite_getDistanceField()

const char * CartesianComposite_getDistanceField ( CartesianComposite_t * self)

Returns the quality field name (how/task) for the distance field to use when executing the DISTANCE selection method.

Parameters
[in]self- self
Returns
the distance field (default is se.smhi.composite.distance.radar)

◆ CartesianComposite_getGain()

double CartesianComposite_getGain ( CartesianComposite_t * self)

Returns the gain.

Parameters
[in]self- self
Returns
the gain

◆ CartesianComposite_getMethod()

CartesianCompositeSelectionMethod_t CartesianComposite_getMethod ( CartesianComposite_t * self)

Returns the currently selection method.

Default is CartesianCompositeSelectionMethod_FIRST.

Parameters
[in]self- self
Returns
the selection method

◆ CartesianComposite_getNodata()

double CartesianComposite_getNodata ( CartesianComposite_t * self)

Returns the nodata.

Parameters
[in]self- self
Returns
the nodata

◆ CartesianComposite_getNumberOfObjects()

int CartesianComposite_getNumberOfObjects ( CartesianComposite_t * self)

Returns the number of objects this composite will process.

Parameters
[in]self- self
Returns
the number of objects

◆ CartesianComposite_getOffset()

double CartesianComposite_getOffset ( CartesianComposite_t * self)

Returns the offset.

Parameters
[in]self- self
Returns
the offset

◆ CartesianComposite_getQuantity()

const char * CartesianComposite_getQuantity ( CartesianComposite_t * self)

Returns the quantity (default DBZH)

Parameters
[in]self- self
Returns
the quantity

◆ CartesianComposite_getTime()

const char * CartesianComposite_getTime ( CartesianComposite_t * self)

Returns the nominal time.

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

◆ CartesianComposite_getUndetect()

double CartesianComposite_getUndetect ( CartesianComposite_t * self)

Returns the undetect.

Parameters
[in]self- self
Returns
the undetect

◆ CartesianComposite_nearest()

Cartesian_t * CartesianComposite_nearest ( CartesianComposite_t * self,
Area_t * area )

Generates a composite according to the nearest radar principle.

Parameters
[in]self- self
[in]area- the area that should be used for defining the composite.
Returns
the generated composite.

◆ CartesianComposite_setDate()

int CartesianComposite_setDate ( CartesianComposite_t * self,
const char * value )

Sets the nominal date.

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

◆ CartesianComposite_setDistanceField()

int CartesianComposite_setDistanceField ( CartesianComposite_t * self,
const char * fieldname )

Sets the distance field to use when executing the DISTANCE selection method.

(MAY NOT BE NULL)

Parameters
[in]self- self
[in]fieldname- the how/task name for the quality field with the distance information
Returns
1 on success otherwise 0

◆ CartesianComposite_setGain()

void CartesianComposite_setGain ( CartesianComposite_t * self,
double gain )

Sets the gain.

Parameters
[in]self- self
[in]gain- the gain (MAY NOT BE 0.0)

◆ CartesianComposite_setMethod()

int CartesianComposite_setMethod ( CartesianComposite_t * self,
CartesianCompositeSelectionMethod_t method )

Sets the selection method to use.

Parameters
[in]self- self
[in]method- the selection method
Returns
1 if the method can be used, otherwise 0

◆ CartesianComposite_setNodata()

void CartesianComposite_setNodata ( CartesianComposite_t * self,
double nodata )

Sets the nodata.

Parameters
[in]self- self
[in]nodata- the nodata

◆ CartesianComposite_setOffset()

void CartesianComposite_setOffset ( CartesianComposite_t * self,
double offset )

Sets the offset.

Parameters
[in]self- self
[in]offset- the offset

◆ CartesianComposite_setQuantity()

int CartesianComposite_setQuantity ( CartesianComposite_t * self,
const char * quantity )

Sets the quantity.

Parameters
[in]self- self
[in]quantity- the quantity, e.g. DBZH
Returns
1 on success, otherwise 0

◆ CartesianComposite_setTime()

int CartesianComposite_setTime ( CartesianComposite_t * self,
const char * value )

Sets the nominal time.

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

◆ CartesianComposite_setUndetect()

void CartesianComposite_setUndetect ( CartesianComposite_t * self,
double undetect )

Sets the undetect.

Parameters
[in]self- self
[in]undetect- the undetect

Variable Documentation

◆ CartesianComposite_TYPE

RaveCoreObjectType CartesianComposite_TYPE
Initial value:
= {
"CartesianComposite",
CartesianComposite_constructor,
CartesianComposite_destructor,
CartesianComposite_copyconstructor
}
struct _CartesianComposite_t CartesianComposite_t
Defines a Cartesian composite generator.
Definition cartesiancomposite.h:56

Type definition to use when creating a rave object.