RAVE
cartesianparam.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------------------------------------------------------------------------*/
27#ifndef CARTESIANPARAM_H
28#define CARTESIANPARAM_H
29#include "rave_proj.h"
30#include "projection.h"
31#include "area.h"
32#include "rave_object.h"
33#include "rave_types.h"
34#include "rave_list.h"
35#include "raveobject_list.h"
36#include "rave_attribute.h"
37#include "rave_field.h"
38#include "rave_legend.h"
39
44
49
56
70
77
85
92
99
106
113
120
127
134
141
148
155
165int CartesianParam_setData(CartesianParam_t* self, long xsize, long ysize, void* data, RaveDataType type);
166
173
183int CartesianParam_createData(CartesianParam_t* self, long xsize, long ysize, RaveDataType type, double value);
184
191
198
207int CartesianParam_setValue(CartesianParam_t* self, long x, long y, double v);
208
213int CartesianParam_setConvertedValue(CartesianParam_t* self, long x, long y, double v, RaveValueType vtype);
214
223RaveValueType CartesianParam_getValue(CartesianParam_t* self, long x, long y, double* v);
224
233RaveValueType CartesianParam_getConvertedValue(CartesianParam_t* self, long x, long y, double* v);
234
244RaveValueType CartesianParam_getMean(CartesianParam_t* self, long x, long y, int N, double* v);
245
255
266
274
284
291
300
308
318
325int CartesianParam_hasAttribute(CartesianParam_t* self, const char* name);
326
334
342
349
356
364
373
380
387
394
395
396#endif
Defines an area, the extent, projection, etc.
RaveDataType CartesianParam_getType(CartesianParam_t *self)
Returns the data type.
Definition cartesianparam.c:319
RaveLegend_t * CartesianParam_getLegend(CartesianParam_t *self)
Returns the legend associated with this parameter.
Definition cartesianparam.c:568
RaveDataType CartesianParam_getDataType(CartesianParam_t *self)
Returns the data type.
Definition cartesianparam.c:190
RaveList_t * CartesianParam_getAttributeNames(CartesianParam_t *self)
Returns a list of attribute names.
Definition cartesianparam.c:472
RaveValueType CartesianParam_getValue(CartesianParam_t *self, long x, long y, double *v)
Returns the value at the specified x and y position.
Definition cartesianparam.c:355
int CartesianParam_addQualityField(CartesianParam_t *self, RaveField_t *field)
Adds a quality field to this cartesian parameter.
Definition cartesianparam.c:502
int CartesianParam_setConvertedValue(CartesianParam_t *self, long x, long y, double v, RaveValueType vtype)
Scales the value v according to gain and offset before setting it.
Definition cartesianparam.c:334
RaveField_t * CartesianParam_getQualityFieldByHowTask(CartesianParam_t *self, const char *value)
Returns a quality field based on the value of how/task that should be a string.
Definition cartesianparam.c:534
double CartesianParam_getOffset(CartesianParam_t *self)
Returns the offset.
Definition cartesianparam.c:243
long CartesianParam_getXSize(CartesianParam_t *self)
Returns the xsize.
Definition cartesianparam.c:172
RaveObjectList_t * CartesianParam_getQualityFields(CartesianParam_t *self)
Returns all quality fields belonging to this cartesian.
Definition cartesianparam.c:528
void * CartesianParam_getData(CartesianParam_t *self)
Returns a pointer to the internal data storage.
Definition cartesianparam.c:313
RaveObjectList_t * CartesianParam_getAttributeValues(CartesianParam_t *self)
Returns a list of attribute values that should be stored for this cartesian product.
Definition cartesianparam.c:484
int CartesianParam_addAttribute(CartesianParam_t *self, RaveAttribute_t *attribute)
Adds a rave attribute to the cartesian product.
Definition cartesianparam.c:419
int CartesianParam_setData(CartesianParam_t *self, long xsize, long ysize, void *data, RaveDataType type)
Sets the data.
Definition cartesianparam.c:279
int CartesianParam_hasAttribute(CartesianParam_t *self, const char *name)
Returns if the cartesian product has got the specified attribute.
Definition cartesianparam.c:496
RaveAttribute_t * CartesianParam_getAttributeVersion(CartesianParam_t *self, const char *name, RaveIO_ODIM_Version version)
Returns the rave attribute in specified version.
Definition cartesianparam.c:462
void CartesianParam_setGain(CartesianParam_t *self, double gain)
Sets the gain.
Definition cartesianparam.c:223
int CartesianParam_isTransformable(CartesianParam_t *self)
Returns if this parameter is transformable.
Definition cartesianparam.c:273
double CartesianParam_getGain(CartesianParam_t *self)
Returns the gain.
Definition cartesianparam.c:231
long CartesianParam_getYSize(CartesianParam_t *self)
Returns the ysize.
Definition cartesianparam.c:181
int CartesianParam_hasLegend(CartesianParam_t *self)
Returns if there is a legend associated with this parameter or not.
Definition cartesianparam.c:562
int CartesianParam_createData(CartesianParam_t *self, long xsize, long ysize, RaveDataType type, double value)
Creates data with the provided specification.
Definition cartesianparam.c:302
const char * CartesianParam_getQuantity(CartesianParam_t *self)
Returns the quantity.
Definition cartesianparam.c:217
double CartesianParam_getNodata(CartesianParam_t *self)
Returns the nodata.
Definition cartesianparam.c:255
RaveList_t * CartesianParam_getAttributeNamesVersion(CartesianParam_t *self, RaveIO_ODIM_Version version)
Returns a list of attribute names for specified version.
Definition cartesianparam.c:478
RaveCoreObjectType CartesianParam_TYPE
Type definition to use when creating a rave object.
Definition cartesianparam.c:576
void CartesianParam_setOffset(CartesianParam_t *self, double offset)
Sets the offset.
Definition cartesianparam.c:237
int CartesianParam_setValue(CartesianParam_t *self, long x, long y, double v)
Sets the value at the specified coordinates.
Definition cartesianparam.c:328
int CartesianParam_getNumberOfQualityFields(CartesianParam_t *self)
Returns the number of quality fields.
Definition cartesianparam.c:514
int CartesianParam_setQuantity(CartesianParam_t *self, const char *quantity)
Sets the quantity.
Definition cartesianparam.c:199
RaveObjectList_t * CartesianParam_getAttributeValuesVersion(CartesianParam_t *self, RaveIO_ODIM_Version version)
Returns a list of attribute values in specified version for this product.
Definition cartesianparam.c:490
RaveAttribute_t * CartesianParam_getAttribute(CartesianParam_t *self, const char *name)
Returns the rave attribute that is named accordingly.
Definition cartesianparam.c:456
int CartesianParam_setDataType(CartesianParam_t *self, RaveDataType type)
Sets the data type of the data that is worked with.
void CartesianParam_setNodata(CartesianParam_t *self, double nodata)
Sets the nodata.
Definition cartesianparam.c:249
RaveValueType CartesianParam_getConvertedValue(CartesianParam_t *self, long x, long y, double *v)
Returns the converted value at the specified x and y position.
Definition cartesianparam.c:379
RaveField_t * CartesianParam_getQualityField(CartesianParam_t *self, int index)
Returns the quality field at the specified location.
Definition cartesianparam.c:508
int CartesianParam_addAttributeVersion(CartesianParam_t *self, RaveAttribute_t *attribute, RaveIO_ODIM_Version version)
Adds a rave attribute of specified version to the cartesian product.
Definition cartesianparam.c:425
void CartesianParam_setLegend(CartesianParam_t *self, RaveLegend_t *legend)
Sets the legend associated with this parameter.
Definition cartesianparam.c:555
void CartesianParam_setUndetect(CartesianParam_t *self, double undetect)
Sets the undetect.
Definition cartesianparam.c:261
RaveValueType CartesianParam_getMean(CartesianParam_t *self, long x, long y, int N, double *v)
Returns the mean value over a NxN square around the specified x and y position.
Definition cartesianparam.c:391
int CartesianParam_setLazyDataset(CartesianParam_t *self, LazyDataset_t *lazyDataset)
Sets a lazy dataset as data member.
Definition cartesianparam.c:290
void CartesianParam_removeQualityField(CartesianParam_t *self, int index)
Removes the quality field at the specified location.
Definition cartesianparam.c:520
double CartesianParam_getUndetect(CartesianParam_t *self)
Returns the undetect.
Definition cartesianparam.c:267
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.
Used for defining a legend that can be added to a parameter.
Implementation of a simple list.
Generic implementation of an object that is used within rave.
Handles compatibility issues related to PROJ versions and the definitions.
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 the cartesian field product.
Definition cartesianparam.c:40
double gain
gain when scaling, default 1
Definition cartesianparam.c:46
RaveData2D_t * data
2 dimensional data array
Definition cartesianparam.c:51
double nodata
nodata
Definition cartesianparam.c:48
double offset
offset when scaling, default 0
Definition cartesianparam.c:47
double undetect
undetect
Definition cartesianparam.c:49
LazyDataset_t * lazyDataset
the lazy dataset
Definition cartesianparam.c:53
RaveLegend_t * legend
the legend
Definition cartesianparam.c:52
RAVE_OBJECT_HEAD char * quantity
Always on top.
Definition cartesianparam.c:44
Represents one lazy dataset.
Definition lazy_dataset.c:37
Represents one scan in a volume.
Definition rave_attribute.c:46
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