RAVE
|
Provides functionality for creating composites. More...
#include "rave_object.h"
#include "rave_types.h"
#include "cartesian.h"
#include "area.h"
#include "composite_algorithm.h"
#include "raveobject_hashtable.h"
#include "limits.h"
Go to the source code of this file.
Macros | |
#define | COMPOSITE_QUALITY_FIELDS_GAIN (1.0/UCHAR_MAX) |
#define | COMPOSITE_QUALITY_FIELDS_OFFSET 0.0 |
Typedefs | |
typedef enum CompositeSelectionMethod_t | CompositeSelectionMethod_t |
What type of selection variant to use. | |
typedef enum CompositeInterpolationMethod_t | CompositeInterpolationMethod_t |
What type of interpolation method that is used to set values in the composite between the discrete value positions of the input data. | |
typedef struct _Composite_t | Composite_t |
Defines a Composite generator. | |
Enumerations | |
enum | CompositeSelectionMethod_t { CompositeSelectionMethod_NEAREST = 0 , CompositeSelectionMethod_HEIGHT } |
What type of selection variant to use. More... | |
enum | CompositeInterpolationMethod_t { CompositeInterpolationMethod_NEAREST = 0 , CompositeInterpolationMethod_LINEAR_HEIGHT , CompositeInterpolationMethod_LINEAR_RANGE , CompositeInterpolationMethod_LINEAR_AZIMUTH , CompositeInterpolationMethod_LINEAR_RANGE_AND_AZIMUTH , CompositeInterpolationMethod_LINEAR_3D , CompositeInterpolationMethod_QUADRATIC_HEIGHT , CompositeInterpolationMethod_QUADRATIC_3D } |
What type of interpolation method that is used to set values in the composite between the discrete value positions of the input data. More... | |
Functions | |
int | Composite_add (Composite_t *composite, RaveCoreObject *object) |
Adds one RaveCoreObject, currently, the only supported type is volumes but this might be enhanced in the future to also allow for cartesian products to be added. | |
int | Composite_getNumberOfObjects (Composite_t *composite) |
Returns the number of objects this composite will process. | |
RaveCoreObject * | Composite_get (Composite_t *composite, int index) |
Return the object at position index. | |
int | Composite_getRadarIndexValue (Composite_t *composite, int index) |
Return the radar index value that has been assigned to the object as position index. | |
void | Composite_setProduct (Composite_t *composite, Rave_ProductType type) |
Sets the product type that should be generated when generating the composite. | |
Rave_ProductType | Composite_getProduct (Composite_t *composite) |
Returns the product type. | |
int | Composite_setSelectionMethod (Composite_t *self, CompositeSelectionMethod_t method) |
Sets the selection method to use. | |
CompositeSelectionMethod_t | Composite_getSelectionMethod (Composite_t *self) |
Returns the selection method. | |
int | Composite_setInterpolationMethod (Composite_t *self, CompositeInterpolationMethod_t interpolationMethod) |
Sets the interpolation method to use. | |
CompositeInterpolationMethod_t | Composite_getInterpolationMethod (Composite_t *self) |
Returns the interpolation method. | |
void | Composite_setInterpolateUndetect (Composite_t *self, int interpolateUndetect) |
Sets if undetect should be used in the interpolation. | |
int | Composite_getInterpolateUndetect (Composite_t *self) |
Returns the if interpolation should be performed using undetect or not. | |
void | Composite_setHeight (Composite_t *composite, double height) |
Sets the height that should be used when generating a composite as CAPPI, PCAPPI or PMAX. | |
double | Composite_getHeight (Composite_t *composite) |
Returns the height that is used for composite generation. | |
void | Composite_setElevationAngle (Composite_t *composite, double angle) |
Sets the elevation angle that should be used when generating a composite as PPI. | |
double | Composite_getElevationAngle (Composite_t *composite) |
Returns the elevation angle that is used for composite generation. | |
void | Composite_setRange (Composite_t *composite, double range) |
Sets the range that should be used when generating the Pseudo MAX. | |
double | Composite_getRange (Composite_t *composite) |
Returns the range in meters. | |
int | Composite_setQualityIndicatorFieldName (Composite_t *self, const char *qiFieldName) |
If this field name is set, then the composite will be generated by first using the quality indicator field for determining radar usage. | |
const char * | Composite_getQualityIndicatorFieldName (Composite_t *self) |
int | Composite_addParameter (Composite_t *composite, const char *quantity, double gain, double offset, double minvalue) |
Adds a parameter to be processed. | |
int | Composite_hasParameter (Composite_t *composite, const char *quantity) |
Returns if this composite generator is going to process specified parameter. | |
int | Composite_getParameterCount (Composite_t *composite) |
Returns the number of parameters to be processed. | |
const char * | Composite_getParameter (Composite_t *composite, int index, double *gain, double *offset) |
Returns the parameter at specified index. | |
int | Composite_setTime (Composite_t *composite, const char *value) |
Sets the nominal time. | |
const char * | Composite_getTime (Composite_t *composite) |
Returns the nominal time. | |
int | Composite_setDate (Composite_t *composite, const char *value) |
Sets the nominal date. | |
const char * | Composite_getDate (Composite_t *composite) |
Returns the nominal date. | |
int | Composite_applyRadarIndexMapping (Composite_t *composite, RaveObjectHashTable_t *mapping) |
If you want the objects included in the composite to have a specific index value when generating the quality field se.smhi.composite.index.radar, then you can provide a hash table that maps source with a RaveAttribute_t containing a long value. | |
Cartesian_t * | Composite_generate (Composite_t *composite, Area_t *area, RaveList_t *qualityflags) |
Generates a composite according to the configured parameters in the composite structure. | |
void | Composite_setAlgorithm (Composite_t *composite, CompositeAlgorithm_t *algorithm) |
Sets the algorithm to use when generating the composite. | |
CompositeAlgorithm_t * | Composite_getAlgorithm (Composite_t *composite) |
Returns the currently used algorithm. | |
Variables | |
RaveCoreObjectType | Composite_TYPE |
Type definition to use when creating a rave object. | |
Provides functionality for creating composites.
typedef struct _Composite_t Composite_t |
Defines a Composite generator.
What type of interpolation method that is used to set values in the composite between the discrete value positions of the input data.
typedef enum CompositeSelectionMethod_t CompositeSelectionMethod_t |
What type of selection variant to use.
What type of interpolation method that is used to set values in the composite between the discrete value positions of the input data.
int Composite_add | ( | Composite_t * | composite, |
RaveCoreObject * | object ) |
Adds one RaveCoreObject, currently, the only supported type is volumes but this might be enhanced in the future to also allow for cartesian products to be added.
[in] | composite | - self |
[in] | object | - the item to be added to the composite |
int Composite_addParameter | ( | Composite_t * | composite, |
const char * | quantity, | ||
double | gain, | ||
double | offset, | ||
double | minvalue ) |
Adds a parameter to be processed.
[in] | composite | - self |
[in] | quantity | - the parameter quantity |
[in] | gain | - the gain to be used for the parameter |
[in] | offset | - the offset to be used for the parameter |
[in] | minvalue | - the minimum value that can be represented for this quantity in the composite |
int Composite_applyRadarIndexMapping | ( | Composite_t * | composite, |
RaveObjectHashTable_t * | mapping ) |
If you want the objects included in the composite to have a specific index value when generating the quality field se.smhi.composite.index.radar, then you can provide a hash table that maps source with a RaveAttribute_t containing a long value.
The source should be the full source as defined in the added objects. The indexes must be unique values, preferrably starting from 1. If there is a mapping missing, the default behaviour is to take first available integer closest to 1.
Note, that in order to the mapping to take, this call must be performed after all the objects has been added to the generator and before calling Composite_generate.
[in] | composite | - self |
[in] | mapping | - the source - index mapping |
Cartesian_t * Composite_generate | ( | Composite_t * | composite, |
Area_t * | area, | ||
RaveList_t * | qualityflags ) |
Generates a composite according to the configured parameters in the composite structure.
[in] | composite | - self |
[in] | area | - the area that should be used for defining the composite. |
[in] | qualityflags | - A list of char pointers identifying how/task values in the quality fields of the polar data. Each entry in this list will result in the atempt to generate a corresponding quality field in the resulting cartesian product. (MAY BE NULL) |
RaveCoreObject * Composite_get | ( | Composite_t * | composite, |
int | index ) |
Return the object at position index.
[in] | composite | - self |
[in] | index | - the index, should be >= 0 and < getNumberOfObjects |
CompositeAlgorithm_t * Composite_getAlgorithm | ( | Composite_t * | composite | ) |
Returns the currently used algorithm.
[in] | composite | - self |
const char * Composite_getDate | ( | Composite_t * | composite | ) |
Returns the nominal date.
[in] | composite | - self |
double Composite_getElevationAngle | ( | Composite_t * | composite | ) |
Returns the elevation angle that is used for composite generation.
[in] | composite | - self |
double Composite_getHeight | ( | Composite_t * | composite | ) |
Returns the height that is used for composite generation.
[in] | composite | - self |
int Composite_getInterpolateUndetect | ( | Composite_t * | self | ) |
Returns the if interpolation should be performed using undetect or not.
[in] | self | - self |
CompositeInterpolationMethod_t Composite_getInterpolationMethod | ( | Composite_t * | self | ) |
Returns the interpolation method.
[in] | self | - self |
int Composite_getNumberOfObjects | ( | Composite_t * | composite | ) |
Returns the number of objects this composite will process.
[in] | composite | - self |
const char * Composite_getParameter | ( | Composite_t * | composite, |
int | index, | ||
double * | gain, | ||
double * | offset ) |
Returns the parameter at specified index.
[in] | composite | - self |
[in] | index | - the index |
[out] | gain | - the gain to be used for the parameter (MAY BE NULL) |
[out] | offset | - the offset to be used for the parameter (MAY BE NULL) |
int Composite_getParameterCount | ( | Composite_t * | composite | ) |
Returns the number of parameters to be processed.
[in] | composite | - self |
Rave_ProductType Composite_getProduct | ( | Composite_t * | composite | ) |
Returns the product type.
const char * Composite_getQualityIndicatorFieldName | ( | Composite_t * | self | ) |
[in] | self | - self |
int Composite_getRadarIndexValue | ( | Composite_t * | composite, |
int | index ) |
Return the radar index value that has been assigned to the object as position index.
[in] | composite | - self |
[in] | index | - the index, should be >= 0 and < getNumberOfObjects |
double Composite_getRange | ( | Composite_t * | composite | ) |
Returns the range in meters.
[in] | composite | - self |
CompositeSelectionMethod_t Composite_getSelectionMethod | ( | Composite_t * | self | ) |
Returns the selection method.
[in] | self | - self |
const char * Composite_getTime | ( | Composite_t * | composite | ) |
Returns the nominal time.
[in] | composite | - self |
int Composite_hasParameter | ( | Composite_t * | composite, |
const char * | quantity ) |
Returns if this composite generator is going to process specified parameter.
[in] | composite | - self |
[in] | quantity | - the parameter quantity |
void Composite_setAlgorithm | ( | Composite_t * | composite, |
CompositeAlgorithm_t * | algorithm ) |
Sets the algorithm to use when generating the composite.
[in] | composite | - self |
[in] | algorithm | - the actual algorithm to be run (MAY BE NULL, indicating nothing particular should be done) |
int Composite_setDate | ( | Composite_t * | composite, |
const char * | value ) |
Sets the nominal date.
[in] | composite | - self |
[in] | value | - the date in the format YYYYMMDD |
void Composite_setElevationAngle | ( | Composite_t * | composite, |
double | angle ) |
Sets the elevation angle that should be used when generating a composite as PPI.
[in] | composite | - self |
[in] | angle | - the angle in radians |
void Composite_setHeight | ( | Composite_t * | composite, |
double | height ) |
Sets the height that should be used when generating a composite as CAPPI, PCAPPI or PMAX.
[in] | composite | - self |
[in] | height | - the height |
void Composite_setInterpolateUndetect | ( | Composite_t * | self, |
int | interpolateUndetect ) |
Sets if undetect should be used in the interpolation.
This requires proper setting of minvalue in the parameter list. The recommended way is to threat undetect and nodata in the same way since Undetect only represents that nothing has been detected. If not interpolation should be performed using undetect the following behaviour will be done.
If all values are UNDETECT, then result will be UNDETECT. If only one value is DATA, then use that value. If more than one value is DATA, then interpolation. If all values are NODATA, then NODATA. If all values are either NODATA or UNDETECT, then UNDETECT.
[in] | self | - self |
[in] | interpolateUndetect | - If interpolation should be used on undetect or not |
int Composite_setInterpolationMethod | ( | Composite_t * | self, |
CompositeInterpolationMethod_t | interpolationMethod ) |
Sets the interpolation method to use.
[in] | self | - self |
[in] | interpolationMethod | - the interpolation method to use |
void Composite_setProduct | ( | Composite_t * | composite, |
Rave_ProductType | type ) |
Sets the product type that should be generated when generating the composite.
Height/Elevation angle and range are used in combination with the products. PPI requires elevation angle CAPPI, PCAPPI and PMAX requires height above sea level PMAX also requires range in meters
[in] | composite | - self |
[in] | type | - the product type, PPI, CAPPI, PCAPPI and PMAX are currently supported. |
int Composite_setQualityIndicatorFieldName | ( | Composite_t * | self, |
const char * | qiFieldName ) |
If this field name is set, then the composite will be generated by first using the quality indicator field for determining radar usage.
If the field name is NULL, then the selection method will be used instead.
[in] | self | - self |
[in] | qiFieldName | - the quality indicator field name |
void Composite_setRange | ( | Composite_t * | composite, |
double | range ) |
Sets the range that should be used when generating the Pseudo MAX.
This range is the limit in meters for when the vertical max should be used. When outside this range, the PCAPPI value is used instead.
[in] | composite | - self |
[in] | angle | - the range in meters |
int Composite_setSelectionMethod | ( | Composite_t * | self, |
CompositeSelectionMethod_t | method ) |
Sets the selection method to use.
[in] | self | - self |
[in] | method | - the method to use |
int Composite_setTime | ( | Composite_t * | composite, |
const char * | value ) |
Sets the nominal time.
[in] | composite | - self |
[in] | value | - the time in the format HHmmss |
|
extern |
Type definition to use when creating a rave object.