RAVE
compositearguments.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2024 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------------------------------------------------------------------------*/
26#ifndef COMPOSITE_ARGUMENTS_H
27#define COMPOSITE_ARGUMENTS_H
28#include "rave_proj.h"
29#include "area.h"
30#include "projection.h"
31#include "rave_object.h"
32#include "rave_datetime.h"
33#include "rave_attribute.h"
34#include "raveobject_list.h"
36#include "odim_sources.h"
37
42
47
63
64
71
78
97
103
110
119
127
134
141int CompositeArguments_setTime(CompositeArguments_t* args, const char* value);
142
149
156int CompositeArguments_setDate(CompositeArguments_t* args, const char* value);
157
164
171
178
186
193
202void CompositeArguments_setRange(CompositeArguments_t* args, double range);
203
210
219
226
235
241void CompositeArguments_removeArgument(CompositeArguments_t* args, const char* name);
242
250
257int CompositeArguments_hasArgument(CompositeArguments_t* args, const char* name);
258
270int CompositeArguments_addParameter(CompositeArguments_t* args, const char* quantity, double gain, double offset, RaveDataType datatype, double nodata, double undetect);
271
278int CompositeArguments_hasParameter(CompositeArguments_t* args, const char* quantity);
279
291int CompositeArguments_getParameter(CompositeArguments_t* args, const char* parameter, double* gain, double* offset, RaveDataType* datatype, double* nodata, double* undetect);
292
299
311const char* CompositeArguments_getParameterAtIndex(CompositeArguments_t* args, int index, double* gain, double* offset, RaveDataType* datatype, double* nodata, double* undetect);
312
320
328
335
343
349
358
366int CompositeArguments_setQIFieldName(CompositeArguments_t* args, const char* fieldname);
367
374
382
390int CompositeArguments_setQualityFlags(CompositeArguments_t* args, const char* flags[], int nrflags);
391
399
407
414
422
429
436
446
453
462
469
477
486
487#endif /* COMPOSITE_ARGUMENTS_H */
Defines an area, the extent, projection, etc.
struct _Area_t Area_t
Defines a Geographical Area.
Definition area.h:35
RaveCoreObjectType CompositeArguments_TYPE
Type definition to use when creating a rave object.
Definition compositearguments.c:1297
int CompositeArguments_setQualityFlags(CompositeArguments_t *args, const char *flags[], int nrflags)
Sets the quality flags that should be used.
Definition compositearguments.c:910
const char * CompositeArguments_getParameterAtIndex(CompositeArguments_t *args, int index, double *gain, double *offset, RaveDataType *datatype, double *nodata, double *undetect)
Returns the parameter at specified index.
Definition compositearguments.c:770
Rave_CompositingProduct CompositeArguments_getCompositingProduct(CompositeArguments_t *args)
If the product could be translated to a compositing product, this will be returned.
Definition compositearguments.c:535
Area_t * CompositeArguments_getArea(CompositeArguments_t *args)
Returns the area.
Definition compositearguments.c:566
int CompositeArguments_getParameterCount(CompositeArguments_t *args)
Returns the number of parameters to be processed.
Definition compositearguments.c:764
RaveAttribute_t * CompositeArguments_getArgument(CompositeArguments_t *args, const char *name)
Returns the rave argument that is named accordingly.
Definition compositearguments.c:680
int CompositeArguments_addQualityFlag(CompositeArguments_t *args, const char *flag)
Adds a quality flag that should be generated during processing.
Definition compositearguments.c:889
void CompositeArguments_setHeight(CompositeArguments_t *args, double height)
Sets the height that should be used when generating a composite.
Definition compositearguments.c:596
int CompositeArguments_getRadarIndexValue(CompositeArguments_t *args, const char *key)
Returns the index for the specified key.
Definition compositearguments.c:1239
int CompositeArguments_getParameter(CompositeArguments_t *args, const char *parameter, double *gain, double *offset, RaveDataType *datatype, double *nodata, double *undetect)
Returns the parameter at specified index.
Definition compositearguments.c:732
int CompositeArguments_removeQualityFlag(CompositeArguments_t *args, const char *flag)
Removes the quality flag with provided name.
Definition compositearguments.c:950
int CompositeArguments_setQIFieldName(CompositeArguments_t *args, const char *fieldname)
If a quality field based algorithm is implemented, this field can be set to indicate what field to us...
Definition compositearguments.c:865
int CompositeArguments_addArgument(CompositeArguments_t *args, RaveAttribute_t *argument)
Adds a rave attriargumentbute to the composite arguments.
Definition compositearguments.c:656
int CompositeArguments_setArea(CompositeArguments_t *args, Area_t *area)
Sets the area to use when creating the composite.
Definition compositearguments.c:556
RaveObjectList_t * CompositeArguments_getObjects(CompositeArguments_t *args)
param[in] args - self
Definition compositearguments.c:843
int CompositeArguments_setTime(CompositeArguments_t *args, const char *value)
Sets the nominal time.
Definition compositearguments.c:572
int CompositeArguments_createRadarIndex(CompositeArguments_t *args, const char *key)
Creates a radar index value for the specified key.
Definition compositearguments.c:1253
const char * CompositeArguments_getDate(CompositeArguments_t *args)
Returns the nominal date.
Definition compositearguments.c:590
Rave_CompositingProduct CompositeArguments_stringToProduct(const char *product)
Converts a string into a product.
Definition compositearguments.c:495
int CompositeArguments_getNumberOfObjects(CompositeArguments_t *args)
Returns the number of objects.
Definition compositearguments.c:824
int CompositeArguments_hasQualityFlag(CompositeArguments_t *args, const char *name)
Definition compositearguments.c:1012
const char * CompositeArguments_getParameterName(CompositeArguments_t *args, int index)
Returns the parameter name at specified index.
Definition compositearguments.c:796
int CompositeArguments_getNumberOfQualityFlags(CompositeArguments_t *args)
Returns the number of quality flags.
Definition compositearguments.c:938
const char * CompositeArguments_productToString(Rave_CompositingProduct product)
Converts a method into a string.
Definition compositearguments.c:487
struct _CompositeArguments_t CompositeArguments_t
Defines a Geographical Area.
Definition compositearguments.h:41
const char * CompositeArguments_getQualityFlagAt(CompositeArguments_t *args, int index)
Returns the name of the quality flag at specified position.
Definition compositearguments.c:944
Rave_CompositingProduct
The predefined types of composites that Rave is aware of but not necessarily support.
Definition compositearguments.h:52
@ Rave_CompositingProduct_RR
RR.
Definition compositearguments.h:58
@ Rave_CompositingProduct_UNDEFINED
Not defined.
Definition compositearguments.h:61
@ Rave_CompositingProduct_PCAPPI
PCAPPI.
Definition compositearguments.h:55
@ Rave_CompositingProduct_MAX
MAX.
Definition compositearguments.h:57
@ Rave_CompositingProduct_PMAX
PMAX.
Definition compositearguments.h:59
@ Rave_CompositingProduct_PPI
PPI.
Definition compositearguments.h:53
@ Rave_CompositingProduct_ACQVA
ACQVA.
Definition compositearguments.h:60
@ Rave_CompositingProduct_CAPPI
CAPPI.
Definition compositearguments.h:54
@ Rave_CompositingProduct_ETOP
ETOP.
Definition compositearguments.h:56
Rave_ProductType CompositeArguments_getProductType(CompositeArguments_t *args)
In some cases it is possible to translate a Rave_CompositingProduct into a Rave_ProductType.
Definition compositearguments.c:541
double CompositeArguments_getElevationAngle(CompositeArguments_t *args)
Returns the elevation angle that is used for composite generation.
Definition compositearguments.c:614
const char * CompositeArguments_getStrategy(CompositeArguments_t *args)
Returns the strategy.
Definition compositearguments.c:649
int CompositeArguments_addObject(CompositeArguments_t *args, RaveCoreObject *object)
Adds a rave object to the arguments.
Definition compositearguments.c:807
RaveList_t * CompositeArguments_getQualityFlags(CompositeArguments_t *args)
Returns a full list of all set quality flags.
Definition compositearguments.c:985
int CompositeArguments_hasArgument(CompositeArguments_t *args, const char *name)
Returns if there is a rave argument that is named accordingly.
Definition compositearguments.c:686
const char * CompositeArguments_getTime(CompositeArguments_t *args)
Returns the nominal time.
Definition compositearguments.c:578
int CompositeArguments_hasParameter(CompositeArguments_t *args, const char *quantity)
Returns if this composite generator is going to process specified parameter.
Definition compositearguments.c:715
RaveCoreObject * CompositeArguments_getObject(CompositeArguments_t *args, int index)
Returns the object at specified index.
Definition compositearguments.c:830
int CompositeArguments_removeQualityFlagAt(CompositeArguments_t *args, int index)
Removes the quality flag at specified index.
Definition compositearguments.c:970
int CompositeArguments_updateRadarIndexMapping(CompositeArguments_t *args, RaveObjectHashTable_t *mapping, OdimSources_t *sources)
Updates the radar index mapping.
Definition compositearguments.c:1153
const char * CompositeArguments_getProduct(CompositeArguments_t *args)
Returns the compositing product.
Definition compositearguments.c:529
int CompositeArguments_getObjectRadarIndexValue(CompositeArguments_t *args, int index)
Returns the objects radar index at specified index.
Definition compositearguments.c:1282
int CompositeArguments_addParameter(CompositeArguments_t *args, const char *quantity, double gain, double offset, RaveDataType datatype, double nodata, double undetect)
Adds a parameter to be processed.
Definition compositearguments.c:692
int CompositeArguments_setDate(CompositeArguments_t *args, const char *value)
Sets the nominal date.
Definition compositearguments.c:584
int CompositeArguments_setStrategy(CompositeArguments_t *args, const char *strategy)
Sets the strategy id.
Definition compositearguments.c:632
void CompositeArguments_setRange(CompositeArguments_t *args, double range)
Sets the range that should be used when generating the Pseudo MAX.
Definition compositearguments.c:620
void CompositeArguments_setElevationAngle(CompositeArguments_t *args, double angle)
Sets the elevation angle that should be used when generating a composite as PPI.
Definition compositearguments.c:608
RaveList_t * CompositeArguments_getRadarIndexKeys(CompositeArguments_t *args)
Returns the registered radar indexes.
Definition compositearguments.c:1233
double CompositeArguments_getHeight(CompositeArguments_t *args)
Returns the height that is used for composite generation.
Definition compositearguments.c:602
double CompositeArguments_getRange(CompositeArguments_t *args)
Returns the range in meters.
Definition compositearguments.c:626
int CompositeArguments_setProduct(CompositeArguments_t *args, const char *product)
Sets the compositing method to use when creating the composite.
Definition compositearguments.c:510
RaveObjectHashTable_t * CompositeArguments_getRadarIndexMapping(CompositeArguments_t *args)
Returns the radar index mapping.
Definition compositearguments.c:1133
void CompositeArguments_removeArgument(CompositeArguments_t *args, const char *name)
Removes the rave argument that is named accordingly.
Definition compositearguments.c:672
int CompositeArguments_createRadarIndexMapping(CompositeArguments_t *args, OdimSources_t *sources)
Creates the radar index mapping from the objects and the sources.
Definition compositearguments.c:1049
const char * CompositeArguments_getQIFieldName(CompositeArguments_t *args)
Returns the name of the field to use when implementing a quality based compositing.
Definition compositearguments.c:882
Provides support for reading the odim sources from an xml-file This object supports RAVE_OBJECT_CLONE...
struct _OdimSources_t OdimSources_t
Defines the odim sources.
Definition odim_sources.h:35
Wrapper around PROJ.4.
Used for keeping track on attributes.
struct _RaveAttribute_t RaveAttribute_t
Defines a rave attribute.
Definition rave_attribute.h:47
Object for managing date and time.
struct _RaveList_t RaveList_t
Defines a list.
Definition rave_list.h:33
Generic implementation of an object that is used within rave.
struct _raveobject RaveCoreObject
The basic raveobject that contains the header information for all rave objects.
struct _raveobjecttype RaveCoreObjectType
The rave object type definition.
Handles compatibility issues related to PROJ versions and the definitions.
Rave_ProductType
Product types that defines the <datasetX>/what/product in the ODIM format.
Definition rave_types.h:101
RaveDataType
Different data types that are supported during transformation.
Definition rave_types.h:130
Implementation of a rave object hashtable that maps between strings and rave core objects.
struct _RaveObjectHashTable_t RaveObjectHashTable_t
Defines a hash table.
Definition raveobject_hashtable.h:38
Implementation of a rave object list that ensures that the objects contained within the list are rele...
struct _RaveObjectList_t RaveObjectList_t
Defines a list.
Definition raveobject_list.h:38
Represents the area.
Definition compositearguments.c:46
RAVE_OBJECT_HEAD char * product
Always on top.
Definition compositearguments.c:48
Area_t * area
the area
Definition compositearguments.c:50
char * strategy
can be used to identify registered plugin / factories
Definition compositearguments.c:55
double height
the height when generating pcapppi, cappi, pmax default 1000
Definition compositearguments.c:52