RAVE
polarscanparam.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------------------------------------------------------------------------*/
26#ifndef POLARSCANPARAM_H
27#define POLARSCANPARAM_H
28#include "polarnav.h"
29#include "projection.h"
30#include "rave_object.h"
31#include "rave_types.h"
32#include "rave_attribute.h"
33#include "rave_list.h"
34#include "raveobject_list.h"
35#include "rave_field.h"
36#include "lazy_dataset.h"
37
42
47
54int PolarScanParam_setQuantity(PolarScanParam_t* scanparam, const char* quantity);
55
61const char* PolarScanParam_getQuantity(PolarScanParam_t* scanparam);
62
68void PolarScanParam_setGain(PolarScanParam_t* scanparam, double gain);
69
76
82void PolarScanParam_setOffset(PolarScanParam_t* scanparam, double offset);
83
90
96void PolarScanParam_setNodata(PolarScanParam_t* scanparam, double nodata);
97
104
111
118
128int PolarScanParam_setData(PolarScanParam_t* scanparam, long nbins, long nrays, void* data, RaveDataType type);
129
136
144
153int PolarScanParam_createData(PolarScanParam_t* scanparam, long nbins, long nrays, RaveDataType type);
154
161
168
175
182
189
198RaveValueType PolarScanParam_getValue(PolarScanParam_t* scanparam, int bin, int ray, double* v);
199
209RaveValueType PolarScanParam_getConvertedValue(PolarScanParam_t* scanparam, int bin, int ray, double* v);
210
219int PolarScanParam_setValue(PolarScanParam_t* scanparam, int bin, int ray, double v);
220
228 RaveAttribute_t* attribute);
229
239
247
257
264int PolarScanParam_hasAttribute(PolarScanParam_t* scanparam, const char* name);
265
272
281
290
300
308
316
323
330
338
347
356
365
373
381int PolarScanParam_shiftData(PolarScanParam_t* param, int nrays);
382
389
396
403
404#endif
This is a wrapper around a lazy nodelist reader used for fetching data from a HL_NodeList.
Utilities for performing polar navigation.
long PolarScanParam_getNrays(PolarScanParam_t *scanparam)
Returns the number of rays/scan.
Definition polarscanparam.c:316
RaveAttribute_t * PolarScanParam_getAttribute(PolarScanParam_t *scanparam, const char *name)
Returns the rave attribute that is named accordingly.
Definition polarscanparam.c:411
RaveLegend_t * PolarScanParam_getLegend(PolarScanParam_t *self)
Returns the legend associated with this parameter.
Definition polarscanparam.c:747
RaveObjectList_t * PolarScanParam_getQualityFields(PolarScanParam_t *param)
Returns all quality fields belonging to this scan parameter.
Definition polarscanparam.c:485
void PolarScanParam_setNodata(PolarScanParam_t *scanparam, double nodata)
Sets the nodata.
Definition polarscanparam.c:213
void PolarScanParam_setLegend(PolarScanParam_t *self, RaveLegend_t *legend)
Sets the legend associated with this parameter.
Definition polarscanparam.c:734
int PolarScanParam_addAttributeVersion(PolarScanParam_t *scanparam, RaveAttribute_t *attribute, RaveIO_ODIM_Version version)
Adds a rave attribute to the parameter.
Definition polarscanparam.c:383
void PolarScanParam_setGain(PolarScanParam_t *scanparam, double gain)
Sets the gain.
Definition polarscanparam.c:189
int PolarScanParam_setData(PolarScanParam_t *scanparam, long nbins, long nrays, void *data, RaveDataType type)
Sets the data.
Definition polarscanparam.c:237
RaveObjectList_t * PolarScanParam_getAttributeValues(PolarScanParam_t *scanparam)
Returns a list of attribute values that should be stored for this parameter.
Definition polarscanparam.c:447
int PolarScanParam_hasAttribute(PolarScanParam_t *scanparam, const char *name)
Returns if the specified attribute exists.
Definition polarscanparam.c:429
RaveList_t * PolarScanParam_getAttributeNamesVersion(PolarScanParam_t *scanparam, RaveIO_ODIM_Version version)
Returns a list of attribute names for specified version.
Definition polarscanparam.c:441
RaveValueType PolarScanParam_getConvertedValue(PolarScanParam_t *scanparam, int bin, int ray, double *v)
Returns the linear converted value at the specified index.
Definition polarscanparam.c:359
void * PolarScanParam_getData(PolarScanParam_t *scanparam)
Returns a pointer to the internal data storage.
Definition polarscanparam.c:289
int PolarScanParam_addQualityField(PolarScanParam_t *param, RaveField_t *field)
Adds a quality field to this scan.
Definition polarscanparam.c:459
RaveField_t * PolarScanParam_getQualityFieldByHowTask(PolarScanParam_t *param, const char *value)
Returns a quality field based on the value of how/task that should be a string.
Definition polarscanparam.c:491
RaveList_t * PolarScanParam_getAttributeNames(PolarScanParam_t *scanparam)
Returns a list of attribute names.
Definition polarscanparam.c:435
int PolarScanParam_getNumberOfQualityFields(PolarScanParam_t *param)
Returns the number of quality fields.
Definition polarscanparam.c:471
RaveField_t * PolarScanParam_getQualityField(PolarScanParam_t *param, int index)
Returns the quality field at the specified location.
Definition polarscanparam.c:465
void PolarScanParam_setOffset(PolarScanParam_t *scanparam, double offset)
Sets the offset.
Definition polarscanparam.c:201
int PolarScanParam_setQuantity(PolarScanParam_t *scanparam, const char *quantity)
Sets the quantity.
Definition polarscanparam.c:165
long PolarScanParam_getNbins(PolarScanParam_t *scanparam)
Returns the number of bins.
Definition polarscanparam.c:307
RaveCoreObjectType PolarScanParam_TYPE
Type definition to use when creating a rave object.
Definition polarscanparam.c:756
RaveObjectList_t * PolarScanParam_getAttributeValuesVersion(PolarScanParam_t *scanparam, RaveIO_ODIM_Version version)
Returns a list of attribute values in specified version that has been added to this parameter.
Definition polarscanparam.c:453
double PolarScanParam_getOffset(PolarScanParam_t *scanparam)
Returns the offset.
Definition polarscanparam.c:207
int PolarScanParam_setLazyDataset(PolarScanParam_t *scanparam, LazyDataset_t *lazyDataset)
Sets a lazy dataset as data member.
Definition polarscanparam.c:248
double PolarScanParam_getUndetect(PolarScanParam_t *scanparam)
Returns the undetect.
Definition polarscanparam.c:231
void PolarScanParam_setUndetect(PolarScanParam_t *scanparam, double undetect)
Sets the undetect.
Definition polarscanparam.c:225
RaveDataType PolarScanParam_getDataType(PolarScanParam_t *scan)
Returns the data type.
Definition polarscanparam.c:325
int PolarScanParam_setData2D(PolarScanParam_t *scanparam, RaveData2D_t *data2d)
Sets the data from a rave data 2d object.
Definition polarscanparam.c:260
double PolarScanParam_getNodata(PolarScanParam_t *scanparam)
Returns the nodata.
Definition polarscanparam.c:219
double PolarScanParam_getGain(PolarScanParam_t *scanparam)
Returns the gain.
Definition polarscanparam.c:195
int PolarScanParam_hasLegend(PolarScanParam_t *self)
Returns if there is a legend associated with this parameter or not.
Definition polarscanparam.c:741
PolarScanParam_t * PolarScanParam_fromField(RaveField_t *field)
Translates a rave field into a polar scan parameter.
Definition polarscanparam.c:597
RaveAttribute_t * PolarScanParam_getAttributeVersion(PolarScanParam_t *scanparam, const char *name, RaveIO_ODIM_Version version)
Returns the rave attribute that is named accordingly and version.
Definition polarscanparam.c:418
int PolarScanParam_shiftData(PolarScanParam_t *param, int nrays)
Performs a circular shift of the dataset and the attributes that are associated with the rays.
Definition polarscanparam.c:717
const char * PolarScanParam_getQuantity(PolarScanParam_t *scanparam)
Returns the quantity.
Definition polarscanparam.c:183
int PolarScanParam_addAttribute(PolarScanParam_t *scanparam, RaveAttribute_t *attribute)
Adds a rave attribute to the parameter.
Definition polarscanparam.c:377
int PolarScanParam_setValue(PolarScanParam_t *scanparam, int bin, int ray, double v)
Sets the value.
Definition polarscanparam.c:372
RaveValueType PolarScanParam_getValue(PolarScanParam_t *scanparam, int bin, int ray, double *v)
Returns the value at the specified index.
Definition polarscanparam.c:334
RaveField_t * PolarScanParam_toField(PolarScanParam_t *param)
Converts a polar scan parameter into a rave field.
Definition polarscanparam.c:512
RaveData2D_t * PolarScanParam_getData2D(PolarScanParam_t *scanparam)
Returns a copy of the internal 2d data field.
Definition polarscanparam.c:295
void PolarScanParam_removeQualityField(PolarScanParam_t *param, int index)
Removes the quality field at the specified location.
Definition polarscanparam.c:477
int PolarScanParam_createData(PolarScanParam_t *scanparam, long nbins, long nrays, RaveDataType type)
Creates a data field with the specified dimensions and type.
Definition polarscanparam.c:278
int PolarScanParam_convertDataDoubleToUchar(PolarScanParam_t *param)
Converter for 64-bit float (from BUFR) to 8-bit uint, primarily for reverting reflectivity data back ...
Definition polarscanparam.c:667
Wrapper around PROJ.4.
Used for keeping track on attributes.
Generic field that only provides a 2-dim data field and a number of dynamic attributes.
Implementation of a simple list.
Generic implementation of an object that is used within rave.
Type definitions for RAVE.
RaveIO_ODIM_Version
The /Conventions version in a ODIM HDF5 file.
Definition rave_types.h:43
RaveDataType
Different data types that are supported during transformation.
Definition rave_types.h:130
RaveValueType
Different value types.
Definition rave_types.h:72
Implementation of a rave object list that ensures that the objects contained within the list are rele...
Represents one lazy dataset.
Definition lazy_dataset.c:37
Represents one param in a scan.
Definition polarscanparam.c:41
double offset
offset when scaling
Definition polarscanparam.c:48
char * quantity
< the legend
Definition polarscanparam.c:46
double nodata
nodata
Definition polarscanparam.c:49
RAVE_OBJECT_HEAD RaveData2D_t * data
Always on top.
Definition polarscanparam.c:43
double undetect
undetect
Definition polarscanparam.c:50
LazyDataset_t * lazyDataset
the lazy dataset
Definition polarscanparam.c:44
double gain
gain when scaling
Definition polarscanparam.c:47
Represents one scan in a volume.
Definition rave_attribute.c:46
Represents a date time instance.
Definition rave_data2d.c:38
Represents the cartesian volume.
Definition rave_field.c:36
Represents one scan in a volume.
Definition rave_legend.c:39
Represents a list.
Definition rave_list.c:36
Represents a list.
Definition raveobject_list.c:35
The rave object type definition.
Definition rave_object.h:52