RAVE
|
Defines the functions available when working with a cartesian field. More...
#include "rave_proj.h"
#include "projection.h"
#include "area.h"
#include "rave_object.h"
#include "rave_types.h"
#include "rave_list.h"
#include "raveobject_list.h"
#include "rave_attribute.h"
#include "rave_field.h"
#include "rave_legend.h"
Go to the source code of this file.
Typedefs | |
typedef struct _CartesianParam_t | CartesianParam_t |
Defines a Cartesian product. | |
Functions | |
long | CartesianParam_getXSize (CartesianParam_t *self) |
Returns the xsize. | |
long | CartesianParam_getYSize (CartesianParam_t *self) |
Returns the ysize. | |
int | CartesianParam_setDataType (CartesianParam_t *self, RaveDataType type) |
Sets the data type of the data that is worked with. | |
RaveDataType | CartesianParam_getDataType (CartesianParam_t *self) |
Returns the data type. | |
int | CartesianParam_setQuantity (CartesianParam_t *self, const char *quantity) |
Sets the quantity. | |
const char * | CartesianParam_getQuantity (CartesianParam_t *self) |
Returns the quantity. | |
void | CartesianParam_setGain (CartesianParam_t *self, double gain) |
Sets the gain. | |
double | CartesianParam_getGain (CartesianParam_t *self) |
Returns the gain. | |
void | CartesianParam_setOffset (CartesianParam_t *self, double offset) |
Sets the offset. | |
double | CartesianParam_getOffset (CartesianParam_t *self) |
Returns the offset. | |
void | CartesianParam_setNodata (CartesianParam_t *self, double nodata) |
Sets the nodata. | |
double | CartesianParam_getNodata (CartesianParam_t *self) |
Returns the nodata. | |
void | CartesianParam_setUndetect (CartesianParam_t *self, double undetect) |
Sets the undetect. | |
double | CartesianParam_getUndetect (CartesianParam_t *self) |
Returns the undetect. | |
int | CartesianParam_isTransformable (CartesianParam_t *self) |
Returns if this parameter is transformable. | |
int | CartesianParam_setData (CartesianParam_t *self, long xsize, long ysize, void *data, RaveDataType type) |
Sets the data. | |
int | CartesianParam_setLazyDataset (CartesianParam_t *self, LazyDataset_t *lazyDataset) |
Sets a lazy dataset as data member. | |
int | CartesianParam_createData (CartesianParam_t *self, long xsize, long ysize, RaveDataType type, double value) |
Creates data with the provided specification. | |
void * | CartesianParam_getData (CartesianParam_t *self) |
Returns a pointer to the internal data storage. | |
RaveDataType | CartesianParam_getType (CartesianParam_t *self) |
Returns the data type. | |
int | CartesianParam_setValue (CartesianParam_t *self, long x, long y, double v) |
Sets the value at the specified coordinates. | |
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. | |
RaveValueType | CartesianParam_getValue (CartesianParam_t *self, long x, long y, double *v) |
Returns the value at the specified x and y position. | |
RaveValueType | CartesianParam_getConvertedValue (CartesianParam_t *self, long x, long y, double *v) |
Returns the converted value at the specified x and y position. | |
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. | |
int | CartesianParam_addAttribute (CartesianParam_t *self, RaveAttribute_t *attribute) |
Adds a rave attribute to the cartesian product. | |
int | CartesianParam_addAttributeVersion (CartesianParam_t *self, RaveAttribute_t *attribute, RaveIO_ODIM_Version version) |
Adds a rave attribute of specified version to the cartesian product. | |
RaveAttribute_t * | CartesianParam_getAttribute (CartesianParam_t *self, const char *name) |
Returns the rave attribute that is named accordingly. | |
RaveAttribute_t * | CartesianParam_getAttributeVersion (CartesianParam_t *self, const char *name, RaveIO_ODIM_Version version) |
Returns the rave attribute in specified version. | |
RaveList_t * | CartesianParam_getAttributeNames (CartesianParam_t *self) |
Returns a list of attribute names. | |
RaveList_t * | CartesianParam_getAttributeNamesVersion (CartesianParam_t *self, RaveIO_ODIM_Version version) |
Returns a list of attribute names for specified version. | |
RaveObjectList_t * | CartesianParam_getAttributeValues (CartesianParam_t *self) |
Returns a list of attribute values that should be stored for this cartesian product. | |
RaveObjectList_t * | CartesianParam_getAttributeValuesVersion (CartesianParam_t *self, RaveIO_ODIM_Version version) |
Returns a list of attribute values in specified version for this product. | |
int | CartesianParam_hasAttribute (CartesianParam_t *self, const char *name) |
Returns if the cartesian product has got the specified attribute. | |
int | CartesianParam_addQualityField (CartesianParam_t *self, RaveField_t *field) |
Adds a quality field to this cartesian parameter. | |
RaveField_t * | CartesianParam_getQualityField (CartesianParam_t *self, int index) |
Returns the quality field at the specified location. | |
int | CartesianParam_getNumberOfQualityFields (CartesianParam_t *self) |
Returns the number of quality fields. | |
void | CartesianParam_removeQualityField (CartesianParam_t *self, int index) |
Removes the quality field at the specified location. | |
RaveObjectList_t * | CartesianParam_getQualityFields (CartesianParam_t *self) |
Returns all quality fields belonging to this cartesian. | |
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. | |
void | CartesianParam_setLegend (CartesianParam_t *self, RaveLegend_t *legend) |
Sets the legend associated with this parameter. | |
int | CartesianParam_hasLegend (CartesianParam_t *self) |
Returns if there is a legend associated with this parameter or not. | |
RaveLegend_t * | CartesianParam_getLegend (CartesianParam_t *self) |
Returns the legend associated with this parameter. | |
Variables | |
RaveCoreObjectType | CartesianParam_TYPE |
Type definition to use when creating a rave object. | |
Defines the functions available when working with a cartesian field.
This object supports RAVE_OBJECT_CLONE.
typedef struct _CartesianParam_t CartesianParam_t |
Defines a Cartesian product.
int CartesianParam_addAttribute | ( | CartesianParam_t * | self, |
RaveAttribute_t * | attribute ) |
Adds a rave attribute to the cartesian product.
If attribute maps to the member attributes it will be used to set the specific member instead.
[in] | self | - self |
[in] | attribute | - the attribute |
int CartesianParam_addAttributeVersion | ( | CartesianParam_t * | self, |
RaveAttribute_t * | attribute, | ||
RaveIO_ODIM_Version | version ) |
Adds a rave attribute of specified version to the cartesian product.
If attribute maps to the member attributes it will be used to set the specific member instead. NOTE! This method is usually only used internally.
[in] | self | - self |
[in] | attribute | - the attribute |
[in] | version | - the attribute version |
int CartesianParam_addQualityField | ( | CartesianParam_t * | self, |
RaveField_t * | field ) |
Adds a quality field to this cartesian parameter.
[in] | self | - self |
[in] | field | - the field to add |
int CartesianParam_createData | ( | CartesianParam_t * | self, |
long | xsize, | ||
long | ysize, | ||
RaveDataType | type, | ||
double | value ) |
Creates data with the provided specification.
[in] | self | - self |
[in] | xsize | - x size |
[in] | ysize | - y size |
[in] | type | - the data type |
[in] | value | - initial value to set for all positions in the data field |
RaveAttribute_t * CartesianParam_getAttribute | ( | CartesianParam_t * | self, |
const char * | name ) |
Returns the rave attribute that is named accordingly.
[in] | self | - self |
[in] | name | - the name of the attribute |
RaveList_t * CartesianParam_getAttributeNames | ( | CartesianParam_t * | self | ) |
Returns a list of attribute names.
Release with @ref RaveList_freeAndDestroy.
[in] | self | - self |
RaveList_t * CartesianParam_getAttributeNamesVersion | ( | CartesianParam_t * | self, |
RaveIO_ODIM_Version | version ) |
Returns a list of attribute names for specified version.
Release with @ref RaveList_freeAndDestroy. NOTE! This method is usually only used internally.
[in] | self | - self |
[in] | version | - the attribute version |
RaveObjectList_t * CartesianParam_getAttributeValues | ( | CartesianParam_t * | self | ) |
Returns a list of attribute values that should be stored for this cartesian product.
Corresponding members will also be added as attribute values.
[in] | self | - self |
RaveObjectList_t * CartesianParam_getAttributeValuesVersion | ( | CartesianParam_t * | self, |
RaveIO_ODIM_Version | version ) |
Returns a list of attribute values in specified version for this product.
Corresponding members will also be added as attribute values. NOTE! This method is usually only used internally.
[in] | self | - self |
[in] | version | - the attribute version |
RaveAttribute_t * CartesianParam_getAttributeVersion | ( | CartesianParam_t * | self, |
const char * | name, | ||
RaveIO_ODIM_Version | version ) |
Returns the rave attribute in specified version.
NOTE! This method is usually only used internally.
[in] | self | - self |
[in] | name | - the name of the attribute |
[in] | version | - the attribute version |
RaveValueType CartesianParam_getConvertedValue | ( | CartesianParam_t * | self, |
long | x, | ||
long | y, | ||
double * | v ) |
Returns the converted value at the specified x and y position.
[in] | self | - the cartesian product |
[in] | x | - the x index |
[in] | y | - the y index |
[out] | v | - the data at the specified index |
void * CartesianParam_getData | ( | CartesianParam_t * | self | ) |
Returns a pointer to the internal data storage.
[in] | self | - self |
RaveDataType CartesianParam_getDataType | ( | CartesianParam_t * | self | ) |
Returns the data type.
[in] | self | - the cartesian product |
double CartesianParam_getGain | ( | CartesianParam_t * | self | ) |
Returns the gain.
[in] | self | - the cartesian product |
RaveLegend_t * CartesianParam_getLegend | ( | CartesianParam_t * | self | ) |
Returns the legend associated with this parameter.
[in] | self | - self |
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.
[in] | self | - the cartesian product |
[in] | x | - the x index |
[in] | y | - the y index |
[in] | N | - the N size |
[out] | v | - the data at the specified index |
double CartesianParam_getNodata | ( | CartesianParam_t * | self | ) |
Returns the nodata.
[in] | self | - the cartesian product |
int CartesianParam_getNumberOfQualityFields | ( | CartesianParam_t * | self | ) |
Returns the number of quality fields.
[in] | self | - self |
double CartesianParam_getOffset | ( | CartesianParam_t * | self | ) |
Returns the offset.
[in] | self | - the cartesian product |
RaveField_t * CartesianParam_getQualityField | ( | CartesianParam_t * | self, |
int | index ) |
Returns the quality field at the specified location.
[in] | self | - self |
[in] | index | - the index |
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.
[in] | self | - self |
[in] | value | - the value of the how/task attribute |
RaveObjectList_t * CartesianParam_getQualityFields | ( | CartesianParam_t * | self | ) |
Returns all quality fields belonging to this cartesian.
The returned object is only a reference so do not modify it.
[in] | self | - self |
const char * CartesianParam_getQuantity | ( | CartesianParam_t * | self | ) |
Returns the quantity.
[in] | self | - the cartesian product |
RaveDataType CartesianParam_getType | ( | CartesianParam_t * | self | ) |
Returns the data type.
[in] | self | - self |
double CartesianParam_getUndetect | ( | CartesianParam_t * | self | ) |
Returns the undetect.
[in] | self | - the cartesian product |
RaveValueType CartesianParam_getValue | ( | CartesianParam_t * | self, |
long | x, | ||
long | y, | ||
double * | v ) |
Returns the value at the specified x and y position.
[in] | self | - the cartesian product |
[in] | x | - the x index |
[in] | y | - the y index |
[out] | v | - the data at the specified index |
long CartesianParam_getXSize | ( | CartesianParam_t * | self | ) |
Returns the xsize.
[in] | self | - the cartesian product |
long CartesianParam_getYSize | ( | CartesianParam_t * | self | ) |
Returns the ysize.
[in] | self | - the cartesian product |
int CartesianParam_hasAttribute | ( | CartesianParam_t * | self, |
const char * | name ) |
Returns if the cartesian product has got the specified attribute.
[in] | self | - self |
[in] | name | - what to look for |
int CartesianParam_hasLegend | ( | CartesianParam_t * | self | ) |
Returns if there is a legend associated with this parameter or not.
[in] | self | - self |
int CartesianParam_isTransformable | ( | CartesianParam_t * | self | ) |
Returns if this parameter is transformable.
I.e. has data.
[in] | self | - self |
void CartesianParam_removeQualityField | ( | CartesianParam_t * | self, |
int | index ) |
Removes the quality field at the specified location.
[in] | self | - self |
[in] | index | - the index |
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.
I.e. same as CartesianParam_setValue(cartesian, x, y, (v - offset)/gain)
int CartesianParam_setData | ( | CartesianParam_t * | self, |
long | xsize, | ||
long | ysize, | ||
void * | data, | ||
RaveDataType | type ) |
Sets the data.
[in] | self | - the cartesian product |
[in] | xsize | - x-size |
[in] | ysize | - y-size |
[in] | data | - the data |
[in] | type | - the data type |
int CartesianParam_setDataType | ( | CartesianParam_t * | self, |
RaveDataType | type ) |
Sets the data type of the data that is worked with.
[in] | self | - the cartesian product |
[in] | type | - the data type |
void CartesianParam_setGain | ( | CartesianParam_t * | self, |
double | gain ) |
Sets the gain.
[in] | self | - the cartesian product |
[in] | gain | - the gain (MAY NOT BE 0.0) |
int CartesianParam_setLazyDataset | ( | CartesianParam_t * | self, |
LazyDataset_t * | lazyDataset ) |
Sets a lazy dataset as data member.
On any requests to receive data, the lazy dataset will be used to populate the internal data field.
[in] |
void CartesianParam_setLegend | ( | CartesianParam_t * | self, |
RaveLegend_t * | legend ) |
Sets the legend associated with this parameter.
[in] | self | - self |
[in] | legend | - the legend |
void CartesianParam_setNodata | ( | CartesianParam_t * | self, |
double | nodata ) |
Sets the nodata.
[in] | self | - the cartesian product |
[in] | nodata | - the nodata |
void CartesianParam_setOffset | ( | CartesianParam_t * | self, |
double | offset ) |
Sets the offset.
[in] | self | - the cartesian product |
[in] | offset | - the offset |
int CartesianParam_setQuantity | ( | CartesianParam_t * | self, |
const char * | quantity ) |
Sets the quantity.
[in] | self | - the cartesian product |
[in] | quantity | - the quantity, e.g. DBZH |
void CartesianParam_setUndetect | ( | CartesianParam_t * | self, |
double | undetect ) |
Sets the undetect.
[in] | self | - the cartesian product |
[in] | undetect | - the undetect |
int CartesianParam_setValue | ( | CartesianParam_t * | self, |
long | x, | ||
long | y, | ||
double | v ) |
Sets the value at the specified coordinates.
[in] | self | - self |
[in] | x | - the x-position |
[in] | y | - the y-position |
[in] | v | - the value to set |
|
extern |
Type definition to use when creating a rave object.