RAVE
composite.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2009 Swedish Meteorological and Hydrological Institute, SMHI,
3
4This file is part of RAVE.
5
6RAVE is free software: you can redistribute it and/or modify
7it under the terms of the GNU Lesser General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
10
11RAVE is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU Lesser General Public License for more details.
15
16You should have received a copy of the GNU Lesser General Public License
17along with RAVE. If not, see <http://www.gnu.org/licenses/>.
18------------------------------------------------------------------------*/
25#ifndef COMPOSITE_H
26#define COMPOSITE_H
27
28#include "rave_object.h"
29#include "rave_types.h"
30#include "cartesian.h"
31#include "area.h"
32#include "composite_algorithm.h"
34#include "limits.h"
35
36#define COMPOSITE_QUALITY_FIELDS_GAIN (1.0/UCHAR_MAX)
37#define COMPOSITE_QUALITY_FIELDS_OFFSET 0.0
38
46
78
83
88
97int Composite_add(Composite_t* composite, RaveCoreObject* object);
98
105
112RaveCoreObject* Composite_get(Composite_t* composite, int index);
113
120int Composite_getRadarIndexValue(Composite_t* composite, int index);
121
134
140
148
155
163
170
187
194
201void Composite_setHeight(Composite_t* composite, double height);
202
208double Composite_getHeight(Composite_t* composite);
209
216void Composite_setElevationAngle(Composite_t* composite, double angle);
217
224
233void Composite_setRange(Composite_t* composite, double range);
234
240double Composite_getRange(Composite_t* composite);
241
251
257
268int Composite_addParameter(Composite_t* composite, const char* quantity, double gain, double offset, double minvalue);
269
276int Composite_hasParameter(Composite_t* composite, const char* quantity);
277
284
293const char* Composite_getParameter(Composite_t* composite, int index, double* gain, double* offset);
294
301int Composite_setTime(Composite_t* composite, const char* value);
302
308const char* Composite_getTime(Composite_t* composite);
309
316int Composite_setDate(Composite_t* composite, const char* value);
317
323const char* Composite_getDate(Composite_t* composite);
324
340
350Cartesian_t* Composite_generate(Composite_t* composite, Area_t* area, RaveList_t* qualityflags);
351
358
365#endif /* COMPOSITE_H */
Defines an area, the extent, projection, etc.
Defines the functions available when working with cartesian products.
CompositeInterpolationMethod_t
What type of interpolation method that is used to set values in the composite between the discrete va...
Definition composite.h:51
@ CompositeInterpolationMethod_NEAREST
Nearest value is used.
Definition composite.h:53
@ CompositeInterpolationMethod_LINEAR_RANGE
Value calculated by performing a linear interpolation between the closest positions on each side of t...
Definition composite.h:59
@ CompositeInterpolationMethod_LINEAR_RANGE_AND_AZIMUTH
Value calculated by performing a linear interpolation in height, azimuth and range directions
Definition composite.h:65
@ CompositeInterpolationMethod_QUADRATIC_HEIGHT
Value calculated by performing a quadratic interpolation in height, azimuth and range directions.
Definition composite.h:72
@ CompositeInterpolationMethod_LINEAR_3D
Value calculated by performing a quadratic interpolation between the closest positions before and bey...
Definition composite.h:68
@ CompositeInterpolationMethod_LINEAR_HEIGHT
Value calculated by performing a linear interpolation between the closest positions before and beyond...
Definition composite.h:56
@ CompositeInterpolationMethod_LINEAR_AZIMUTH
Value calculated by performing a linear interpolation in azimuth and range directions
Definition composite.h:62
int Composite_add(Composite_t *composite, RaveCoreObject *object)
Adds one RaveCoreObject, currently, the only supported type is volumes but this might be enhanced in ...
Definition composite.c:2611
int Composite_setInterpolationMethod(Composite_t *self, CompositeInterpolationMethod_t interpolationMethod)
Sets the interpolation method to use.
Definition composite.c:2703
void Composite_setInterpolateUndetect(Composite_t *self, int interpolateUndetect)
Sets if undetect should be used in the interpolation.
Definition composite.c:2720
RaveCoreObject * Composite_get(Composite_t *composite, int index)
Return the object at position index.
Definition composite.c:2643
CompositeAlgorithm_t * Composite_getAlgorithm(Composite_t *composite)
Returns the currently used algorithm.
Definition composite.c:3624
int Composite_addParameter(Composite_t *composite, const char *quantity, double gain, double offset, double minvalue)
Adds a parameter to be processed.
Definition composite.c:2796
int Composite_setDate(Composite_t *composite, const char *value)
Sets the nominal date.
Definition composite.c:2873
CompositeSelectionMethod_t Composite_getSelectionMethod(Composite_t *self)
Returns the selection method.
Definition composite.c:2697
const char * Composite_getTime(Composite_t *composite)
Returns the nominal time.
Definition composite.c:2867
int Composite_setSelectionMethod(Composite_t *self, CompositeSelectionMethod_t method)
Sets the selection method to use.
Definition composite.c:2686
void Composite_setElevationAngle(Composite_t *composite, double angle)
Sets the elevation angle that should be used when generating a composite as PPI.
Definition composite.c:2744
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 ...
Definition composite.c:2885
void Composite_setAlgorithm(Composite_t *composite, CompositeAlgorithm_t *algorithm)
Sets the algorithm to use when generating the composite.
Definition composite.c:3617
void Composite_setHeight(Composite_t *composite, double height)
Sets the height that should be used when generating a composite as CAPPI, PCAPPI or PMAX.
Definition composite.c:2732
const char * Composite_getDate(Composite_t *composite)
Returns the nominal date.
Definition composite.c:2879
void Composite_setProduct(Composite_t *composite, Rave_ProductType type)
Sets the product type that should be generated when generating the composite.
Definition composite.c:2666
int Composite_hasParameter(Composite_t *composite, const char *quantity)
Returns if this composite generator is going to process specified parameter.
Definition composite.c:2821
int Composite_getInterpolateUndetect(Composite_t *self)
Returns the if interpolation should be performed using undetect or not.
Definition composite.c:2726
int Composite_getParameterCount(Composite_t *composite)
Returns the number of parameters to be processed.
Definition composite.c:2838
int Composite_setTime(Composite_t *composite, const char *value)
Sets the nominal time.
Definition composite.c:2861
Rave_ProductType Composite_getProduct(Composite_t *composite)
Returns the product type.
Definition composite.c:2680
const char * Composite_getParameter(Composite_t *composite, int index, double *gain, double *offset)
Returns the parameter at specified index.
Definition composite.c:2844
double Composite_getElevationAngle(Composite_t *composite)
Returns the elevation angle that is used for composite generation.
Definition composite.c:2750
double Composite_getRange(Composite_t *composite)
Returns the range in meters.
Definition composite.c:2762
int Composite_getRadarIndexValue(Composite_t *composite, int index)
Return the radar index value that has been assigned to the object as position index.
Definition composite.c:2654
int Composite_getNumberOfObjects(Composite_t *composite)
Returns the number of objects this composite will process.
Definition composite.c:2637
CompositeSelectionMethod_t
What type of selection variant to use.
Definition composite.h:42
@ CompositeSelectionMethod_NEAREST
Nearest radar defines pixel to use (default)
Definition composite.h:43
double Composite_getHeight(Composite_t *composite)
Returns the height that is used for composite generation.
Definition composite.c:2738
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 ...
Definition composite.c:2768
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.
Definition composite.c:3440
CompositeInterpolationMethod_t Composite_getInterpolationMethod(Composite_t *self)
Returns the interpolation method.
Definition composite.c:2714
const char * Composite_getQualityIndicatorFieldName(Composite_t *self)
Definition composite.c:2790
void Composite_setRange(Composite_t *composite, double range)
Sets the range that should be used when generating the Pseudo MAX.
Definition composite.c:2756
RaveCoreObjectType Composite_TYPE
Type definition to use when creating a rave object.
Definition composite.c:3632
Interface for defining your own compositing algorithm.
Generic implementation of an object that is used within rave.
Type definitions for RAVE.
Rave_ProductType
Product types that defines the <datasetX>/what/product in the ODIM format.
Definition rave_types.h:101
Implementation of a rave object hashtable that maps between strings and rave core objects.
Represents the area.
Definition area.c:34
Represents the cartesian product.
Definition cartesian.c:41
The basic composite algorithm that can be cast into a subclassed processor.
Definition composite_algorithm.h:127
Represents the cartesian product.
Definition composite.c:45
CompositeSelectionMethod_t method
selection method, default CompositeSelectionMethod_NEAREST
Definition composite.c:48
double height
the height when generating pcapppi, cappi, pmax default 1000
Definition composite.c:51
int interpolateUndetect
If undetect should be used during interpolation or not.
Definition composite.c:50
CompositeAlgorithm_t * algorithm
the specific algorithm
Definition composite.c:57
char * qiFieldName
the Quality Indicator field name to use when determining the radar usage
Definition composite.c:58
CompositeInterpolationMethod_t interpolationMethod
interpolation method, default CompositeInterpolationMethod_NEAREST
Definition composite.c:49
Represents a list.
Definition rave_list.c:36
Represents a hash table.
Definition raveobject_hashtable.c:45
The basic raveobject that contains the header information for all rave objects.
Definition rave_object.h:42
The rave object type definition.
Definition rave_object.h:52