RAVE
|
Defines the functions available when working with cartesian products. More...
#include "cartesian.h"
#include "area.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include "rave_datetime.h"
#include "rave_data2d.h"
#include "raveobject_hashtable.h"
#include "rave_utilities.h"
#include <string.h>
#include <stdio.h>
#include "projection_pipeline.h"
#include "rave_attribute_table.h"
Classes | |
struct | _Cartesian_t |
Represents the cartesian product. More... | |
Functions | |
int | Cartesian_setTime (Cartesian_t *cartesian, const char *value) |
Sets the nominal time. | |
const char * | Cartesian_getTime (Cartesian_t *cartesian) |
Returns the nominal time. | |
int | Cartesian_setDate (Cartesian_t *cartesian, const char *value) |
Sets the nominal date. | |
const char * | Cartesian_getDate (Cartesian_t *cartesian) |
Returns the nominal date. | |
int | Cartesian_setStartTime (Cartesian_t *cartesian, const char *value) |
Sets the start time. | |
const char * | Cartesian_getStartTime (Cartesian_t *cartesian) |
Returns the start time. | |
int | Cartesian_setStartDate (Cartesian_t *cartesian, const char *value) |
Sets the start date. | |
const char * | Cartesian_getStartDate (Cartesian_t *cartesian) |
Returns the start date. | |
int | Cartesian_setEndTime (Cartesian_t *cartesian, const char *value) |
Sets the end time. | |
const char * | Cartesian_getEndTime (Cartesian_t *cartesian) |
Returns the end time. | |
int | Cartesian_setEndDate (Cartesian_t *cartesian, const char *value) |
Sets the end date. | |
const char * | Cartesian_getEndDate (Cartesian_t *cartesian) |
Returns the end date. | |
int | Cartesian_setSource (Cartesian_t *cartesian, const char *value) |
Sets the source. | |
const char * | Cartesian_getSource (Cartesian_t *cartesian) |
Returns the source. | |
int | Cartesian_setProdname (Cartesian_t *cartesian, const char *value) |
Sets the product name. | |
const char * | Cartesian_getProdname (Cartesian_t *cartesian) |
Returns the product name. | |
int | Cartesian_setObjectType (Cartesian_t *self, Rave_ObjectType type) |
Sets the object type this cartesian product should represent. | |
Rave_ObjectType | Cartesian_getObjectType (Cartesian_t *self) |
Returns the object type this cartesian product represents. | |
void | Cartesian_setXSize (Cartesian_t *self, long xsize) |
The xsize to use for the parameters. | |
void | Cartesian_setYSize (Cartesian_t *self, long ysize) |
The ysize to use for the parameters. | |
long | Cartesian_getXSize (Cartesian_t *self) |
Returns the xsize. | |
long | Cartesian_getYSize (Cartesian_t *self) |
Returns the ysize. | |
void | Cartesian_setAreaExtent (Cartesian_t *cartesian, double llX, double llY, double urX, double urY) |
Sets the area extent for this cartesian product. | |
void | Cartesian_getAreaExtent (Cartesian_t *cartesian, double *llX, double *llY, double *urX, double *urY) |
Gets the area extent for this cartesian product. | |
int | Cartesian_getExtremeLonLatBoundaries (Cartesian_t *self, double *ulLon, double *ulLat, double *lrLon, double *lrLat) |
Determines the extreme lon lat boundaries for this area. | |
void | Cartesian_setXScale (Cartesian_t *cartesian, double xscale) |
Sets the xscale. | |
double | Cartesian_getXScale (Cartesian_t *cartesian) |
Returns the xscale. | |
void | Cartesian_setYScale (Cartesian_t *cartesian, double yscale) |
Sets the yscale. | |
double | Cartesian_getYScale (Cartesian_t *cartesian) |
Returns the yscale. | |
int | Cartesian_setProduct (Cartesian_t *cartesian, Rave_ProductType type) |
Sets the product this cartesian represents. | |
Rave_ProductType | Cartesian_getProduct (Cartesian_t *cartesian) |
Returns the product this cartesian represents. | |
double | Cartesian_getNodata (Cartesian_t *self) |
Returns the nodata value. | |
double | Cartesian_getUndetect (Cartesian_t *self) |
Returns the undetect value. | |
double | Cartesian_getLocationX (Cartesian_t *cartesian, long x) |
Returns the location within the area as identified by a x-position. | |
double | Cartesian_getLocationY (Cartesian_t *cartesian, long y) |
Returns the location within the area as identified by a y-position. | |
long | Cartesian_getIndexX (Cartesian_t *cartesian, double x) |
Returns the x index Evaluated as: (x - lowerLeft.x)/xscale. | |
long | Cartesian_getIndexY (Cartesian_t *cartesian, double y) |
Returns the y index Evaluated as: (upperRight.y - y)/yscale. | |
int | Cartesian_getLonLatFromXY (Cartesian_t *self, int x, int y, double *lon, double *lat) |
Converts a x/y position into lon/lat. | |
int | Cartesian_getLonLatFromXYLocation (Cartesian_t *self, double x, double y, double *lon, double *lat) |
Converts a x/y cartesian coordinate into lon/lat. | |
int | Cartesian_getXYFromLonLat (Cartesian_t *self, double lon, double lat, int *x, int *y) |
Converts a lon/lat position into a x/y position. | |
int | Cartesian_getXYLocationFromLonLat (Cartesian_t *self, double lon, double lat, double *x, double *y) |
Converts a lon/lat position into a x/y cartesian coordinate. | |
int | Cartesian_setDefaultParameter (Cartesian_t *cartesian, const char *name) |
Sets the default parameter. | |
const char * | Cartesian_getDefaultParameter (Cartesian_t *cartesian) |
Returns the default parameter. | |
int | Cartesian_setProjection (Cartesian_t *cartesian, Projection_t *projection) |
Sets the projection that defines this cartesian product. | |
Projection_t * | Cartesian_getProjection (Cartesian_t *cartesian) |
Returns a copy of the projection that is used for this cartesian product. | |
const char * | Cartesian_getProjectionString (Cartesian_t *cartesian) |
Returns the projection string defining this cartesian product. | |
int | Cartesian_setValue (Cartesian_t *cartesian, long x, long y, double v) |
Sets the value at the specified coordinates. | |
int | Cartesian_setConvertedValue (Cartesian_t *cartesian, long x, long y, double v) |
Scales the value v according to gain and offset before setting it. | |
RaveValueType | Cartesian_getValue (Cartesian_t *cartesian, long x, long y, double *v) |
Returns the value at the specified x and y position. | |
RaveValueType | Cartesian_getConvertedValue (Cartesian_t *cartesian, long x, long y, double *v) |
Returns the converted value at the specified x and y position. | |
RaveValueType | Cartesian_getValueAtLocation (Cartesian_t *cartesian, double lx, double ly, double *v) |
Returns the value from the location as defined by the area definition. | |
RaveValueType | Cartesian_getConvertedValueAtLocation (Cartesian_t *cartesian, double lx, double ly, double *v) |
Returns the converted value from the location as defined by the area definition. | |
RaveValueType | Cartesian_getConvertedValueAtLonLat (Cartesian_t *cartesian, double lon, double lat, double *v) |
Returns the converted value from the lon/lat position within the area. | |
int | Cartesian_getQualityValueAtLocation (Cartesian_t *cartesian, double lx, double ly, const char *name, double *v) |
Returns the quality value at the specified location from the specified quality field. | |
int | Cartesian_getConvertedQualityValueAtLocation (Cartesian_t *cartesian, double lx, double ly, const char *name, double *v) |
Returns the scaled quality value at the specified location from the specified quality field. | |
int | Cartesian_getQualityValueAtLonLat (Cartesian_t *cartesian, double lon, double lat, const char *name, double *v) |
Returns the quality value at the specified lon/lat from the specified quality field. | |
int | Cartesian_getConvertedQualityValueAtLonLat (Cartesian_t *cartesian, double lon, double lat, const char *name, double *v) |
Returns the scaled quality value at the specified lon/lat from the specified quality field. | |
void | Cartesian_init (Cartesian_t *self, Area_t *area) |
Initializes this cartesian product with basic information. | |
RaveValueType | Cartesian_getMean (Cartesian_t *cartesian, long x, long y, int N, double *v) |
Returns the mean value over a NxN square around the specified x and y position. | |
int | Cartesian_isTransformable (Cartesian_t *cartesian) |
Verifies that all preconditions are met in order to perform a transformation. | |
int | Cartesian_addAttribute (Cartesian_t *cartesian, RaveAttribute_t *attribute) |
Adds a rave attribute to the cartesian product. | |
int | Cartesian_addAttributeVersion (Cartesian_t *cartesian, RaveAttribute_t *attribute, RaveIO_ODIM_Version version) |
Adds a rave attribute to the cartesian product for specified version. | |
RaveAttribute_t * | Cartesian_getAttribute (Cartesian_t *cartesian, const char *name) |
Returns the rave attribute that is named accordingly. | |
RaveAttribute_t * | Cartesian_getAttributeVersion (Cartesian_t *cartesian, const char *name, RaveIO_ODIM_Version version) |
Returns the rave attribute that is named accordingly for specified version. | |
RaveList_t * | Cartesian_getAttributeNames (Cartesian_t *cartesian) |
Returns a list of attribute names. | |
RaveList_t * | Cartesian_getAttributeNamesVersion (Cartesian_t *cartesian, RaveIO_ODIM_Version version) |
Returns a list of attribute names actual for specified version. | |
RaveObjectList_t * | Cartesian_getAttributeValues (Cartesian_t *cartesian) |
Returns a list of attribute values that should be stored for this cartesian product. | |
RaveObjectList_t * | Cartesian_getAttributeValuesVersion (Cartesian_t *cartesian, RaveIO_ODIM_Version version) |
Returns a list of attribute values that has been set for this product. | |
int | Cartesian_hasAttribute (Cartesian_t *cartesian, const char *name) |
Returns if the cartesian product has got the specified attribute. | |
int | Cartesian_addQualityField (Cartesian_t *cartesian, RaveField_t *field) |
Adds a quality field to this cartesian product. | |
RaveField_t * | Cartesian_getQualityField (Cartesian_t *cartesian, int index) |
Returns the quality field at the specified location. | |
int | Cartesian_getNumberOfQualityFields (Cartesian_t *cartesian) |
Returns the number of quality fields. | |
void | Cartesian_removeQualityField (Cartesian_t *cartesian, int index) |
Removes the quality field at the specified location. | |
RaveObjectList_t * | Cartesian_getQualityFields (Cartesian_t *cartesian) |
Returns all quality fields belonging to this cartesian. | |
RaveField_t * | Cartesian_getQualityFieldByHowTask (Cartesian_t *cartesian, const char *value) |
Returns a quality field based on the value of how/task that should be a string. | |
RaveField_t * | Cartesian_findQualityFieldByHowTask (Cartesian_t *self, const char *value) |
Same as Cartesian_getQualityFieldByHowTask but it first tries if there are any quality fields in the current parameter before checking self. | |
int | Cartesian_addParameter (Cartesian_t *self, CartesianParam_t *param) |
Adds a parameter to the cartesian product. | |
CartesianParam_t * | Cartesian_getParameter (Cartesian_t *self, const char *name) |
Returns the parameter with the specified quantity. | |
int | Cartesian_hasParameter (Cartesian_t *self, const char *quantity) |
Returns if the product contains the specified parameter or not. | |
void | Cartesian_removeParameter (Cartesian_t *self, const char *name) |
Removes the parameter with the specified quantity. | |
int | Cartesian_getParameterCount (Cartesian_t *self) |
Return the number of parameters. | |
RaveList_t * | Cartesian_getParameterNames (Cartesian_t *self) |
Returns a list of parameter names. | |
CartesianParam_t * | Cartesian_createParameter (Cartesian_t *self, const char *quantity, RaveDataType type, double datavalue) |
Creates a parameter. | |
Variables | |
RaveCoreObjectType | Cartesian_TYPE |
Type definition to use when creating a rave object. | |
Defines the functions available when working with cartesian products.
int Cartesian_addAttribute | ( | Cartesian_t * | cartesian, |
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] | cartesian | - self |
[in] | attribute | - the attribute |
int Cartesian_addAttributeVersion | ( | Cartesian_t * | cartesian, |
RaveAttribute_t * | attribute, | ||
RaveIO_ODIM_Version | version ) |
Adds a rave attribute to the cartesian product for specified version.
If attribute maps to the member attributes it will be used to set the specific member. NOTE! This method is usually only used internally. instead.
[in] | cartesian | - self |
[in] | attribute | - the attribute |
[in] | version | - the attribute version |
int Cartesian_addParameter | ( | Cartesian_t * | self, |
CartesianParam_t * | param ) |
Adds a parameter to the cartesian product.
The quantity is used as unique identifier which means that any existing one will be removed.
[in] | self | - self |
[in] | param | - the parameter |
int Cartesian_addQualityField | ( | Cartesian_t * | cartesian, |
RaveField_t * | field ) |
Adds a quality field to this cartesian product.
[in] | cartesian | - self |
[in] | field | - the field to add |
CartesianParam_t * Cartesian_createParameter | ( | Cartesian_t * | self, |
const char * | quantity, | ||
RaveDataType | type, | ||
double | datavalue ) |
Creates a parameter.
The created parameter will be added to the internal list of parameters. So if you are just going to create one, wrap the call in a RAVE_OBJECT_RELEASE. It is essential that _init has been called in order for this to have any effect.
[in] | self | - self |
[in] | quantity | - the quantity of the created parameter |
[in] | type | - the data type |
[in] | datavalue | - value to initialise the data field with |
RaveField_t * Cartesian_findQualityFieldByHowTask | ( | Cartesian_t * | self, |
const char * | value ) |
Same as Cartesian_getQualityFieldByHowTask but it first tries if there are any quality fields in the current parameter before checking self.
[in] | self | - self |
void Cartesian_getAreaExtent | ( | Cartesian_t * | cartesian, |
double * | llX, | ||
double * | llY, | ||
double * | urX, | ||
double * | urY ) |
Gets the area extent for this cartesian product.
[in] | cartesian | - the cartesian product |
[out] | llX | - lower left X position (may be NULL) |
[out] | llY | - lower left Y position (may be NULL) |
[out] | urX | - upper right X position (may be NULL) |
[out] | urY | - upper right Y position (may be NULL) |
RaveAttribute_t * Cartesian_getAttribute | ( | Cartesian_t * | cartesian, |
const char * | name ) |
Returns the rave attribute that is named accordingly.
[in] | cartesian | - self |
[in] | name | - the name of the attribute |
RaveList_t * Cartesian_getAttributeNames | ( | Cartesian_t * | cartesian | ) |
Returns a list of attribute names.
Release with @ref RaveList_freeAndDestroy.
[in] | cartesian | - self |
RaveList_t * Cartesian_getAttributeNamesVersion | ( | Cartesian_t * | cartesian, |
RaveIO_ODIM_Version | version ) |
Returns a list of attribute names actual for specified version.
Release with @ref RaveList_freeAndDestroy. NOTE! This method is usually only used internally.
[in] | cartesian | - self |
[in] | version | - the attribute version |
RaveObjectList_t * Cartesian_getAttributeValues | ( | Cartesian_t * | cartesian | ) |
Returns a list of attribute values that should be stored for this cartesian product.
Corresponding members will also be added as attribute values.
[in] | cartesian | - self |
[in] | otype | - what type of attributes that should be returned, if it is for a cartesian image or a image belonging to a cartesian volume |
RaveObjectList_t * Cartesian_getAttributeValuesVersion | ( | Cartesian_t * | cartesian, |
RaveIO_ODIM_Version | version ) |
Returns a list of attribute values that has been set for this product.
NOTE! This method is usually only used internally.
[in] | cartesian | - self |
[in] | version | - the attribute version belonging to a cartesian volume |
RaveAttribute_t * Cartesian_getAttributeVersion | ( | Cartesian_t * | cartesian, |
const char * | name, | ||
RaveIO_ODIM_Version | version ) |
Returns the rave attribute that is named accordingly for specified version.
NOTE! This method is usually only used internally.
[in] | cartesian | - self |
[in] | name | - the name of the attribute |
[in] | version | - the attribute version |
int Cartesian_getConvertedQualityValueAtLocation | ( | Cartesian_t * | cartesian, |
double | lx, | ||
double | ly, | ||
const char * | name, | ||
double * | v ) |
Returns the scaled quality value at the specified location from the specified quality field.
First the code tests if the quality field exist in the default param. If not, it will check for the quality field in self.
[in] | cartesian | - self |
[in] | lx | - the position as defined in the area definition |
[in] | ly | - the position as defined in the area definition |
[in] | name | - the name of the quality field (how/task) |
[out] | v | - the data at the specified position |
int Cartesian_getConvertedQualityValueAtLonLat | ( | Cartesian_t * | cartesian, |
double | lon, | ||
double | lat, | ||
const char * | name, | ||
double * | v ) |
Returns the scaled quality value at the specified lon/lat from the specified quality field.
That is the value got when applying gain and offset. First the code tests if the quality field exist in the default param. If not, it will check for the quality field in self.
[in] | cartesian | - self |
[in] | lon | - the longitude in radians |
[in] | lat | - the latitude in radians |
[in] | name | - the name of the quality field (how/task) |
[out] | v | - the data at the specified position |
RaveValueType Cartesian_getConvertedValue | ( | Cartesian_t * | cartesian, |
long | x, | ||
long | y, | ||
double * | v ) |
Returns the converted value at the specified x and y position.
[in] | cartesian | - the cartesian product |
[in] | x | - the x index |
[in] | y | - the y index |
[out] | v | - the data at the specified index |
RaveValueType Cartesian_getConvertedValueAtLocation | ( | Cartesian_t * | cartesian, |
double | lx, | ||
double | ly, | ||
double * | v ) |
Returns the converted value from the location as defined by the area definition.
Same as calling Cartesian_getConvertedValue(c, Cartesian_getIndexX(c), Cartesian_getIndexY(c), &v).
[in] | cartesian | - self |
[in] | lx | - the position as defined in the area definition |
[in] | ly | - the position as defined in the area definition |
[out] | v | - the data at the specified position |
RaveValueType Cartesian_getConvertedValueAtLonLat | ( | Cartesian_t * | cartesian, |
double | lon, | ||
double | lat, | ||
double * | v ) |
Returns the converted value from the lon/lat position within the area.
[in] | cartesian | - self |
[in] | lon | - the longitude (in radians) |
[in] | lat | - the latitude (in radians) |
[out] | v | - the data at the specified position |
const char * Cartesian_getDate | ( | Cartesian_t * | cartesian | ) |
Returns the nominal date.
[in] | cartesian | - self |
const char * Cartesian_getDefaultParameter | ( | Cartesian_t * | self | ) |
Returns the default parameter.
[in] | self | - self |
const char * Cartesian_getEndDate | ( | Cartesian_t * | cartesian | ) |
Returns the end date.
[in] | cartesian | - self |
const char * Cartesian_getEndTime | ( | Cartesian_t * | cartesian | ) |
Returns the end time.
[in] | cartesian | - self |
int Cartesian_getExtremeLonLatBoundaries | ( | Cartesian_t * | self, |
double * | ulLon, | ||
double * | ulLat, | ||
double * | lrLon, | ||
double * | lrLat ) |
Determines the extreme lon lat boundaries for this area.
I.e. the outer boundaries of this cartesian image will be steped over until the absolute min/max lon/lat positions are found for this image. Note, that the bounding box returned will be in a different setup than area extent
[in] | self | - self |
[out] | ulLon | - Upper left longitude |
[out] | ulLat | - Upper left latitude |
[out] | lrLon | - Lower right longitude |
[out] | lrLat | - Lower right latitude |
long Cartesian_getIndexX | ( | Cartesian_t * | cartesian, |
double | x ) |
Returns the x index Evaluated as: (x - lowerLeft.x)/xscale.
[in] | cartesian | - the cartesian product |
[in] | x | - the x position in the area definition |
long Cartesian_getIndexY | ( | Cartesian_t * | cartesian, |
double | y ) |
Returns the y index Evaluated as: (upperRight.y - y)/yscale.
[in] | cartesian | - the cartesian product |
[in] | y | - the y position in the area definition |
double Cartesian_getLocationX | ( | Cartesian_t * | cartesian, |
long | x ) |
Returns the location within the area as identified by a x-position.
Evaluated as: upperLeft.x + xscale * x
[in] | cartesian | - the cartesian product |
[in] | x | - the x position in the area definition |
double Cartesian_getLocationY | ( | Cartesian_t * | cartesian, |
long | y ) |
Returns the location within the area as identified by a y-position.
Evaluated as: upperLeft.y - yscale * y
[in] | cartesian | - the cartesian product |
[in] | y | - the y position in the area definition |
int Cartesian_getLonLatFromXY | ( | Cartesian_t * | self, |
int | x, | ||
int | y, | ||
double * | lon, | ||
double * | lat ) |
Converts a x/y position into lon/lat.
[in] | x | - the x position, should >= 0 and < xsize. |
[in] | y | - the y position, should >= 0 and < ysize. |
[out] | lon | - the lon coordinate |
[out] | lat | - the lat coordinate |
int Cartesian_getLonLatFromXYLocation | ( | Cartesian_t * | self, |
double | x, | ||
double | y, | ||
double * | lon, | ||
double * | lat ) |
Converts a x/y cartesian coordinate into lon/lat.
[in] | x | - the x position, should be inside x-extent |
[in] | y | - the y position, should be inside y-extent. |
[out] | lon | - the lon coordinate |
[out] | lat | - the lat coordinate |
RaveValueType Cartesian_getMean | ( | Cartesian_t * | cartesian, |
long | x, | ||
long | y, | ||
int | N, | ||
double * | v ) |
Returns the mean value over a NxN square around the specified x and y position.
[in] | cartesian | - 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 Cartesian_getNodata | ( | Cartesian_t * | self | ) |
Returns the nodata value.
[in] | self | - self |
int Cartesian_getNumberOfQualityFields | ( | Cartesian_t * | cartesian | ) |
Returns the number of quality fields.
[in] | cartesian | - self |
Rave_ObjectType Cartesian_getObjectType | ( | Cartesian_t * | self | ) |
Returns the object type this cartesian product represents.
[in] | self | - self |
CartesianParam_t * Cartesian_getParameter | ( | Cartesian_t * | self, |
const char * | name ) |
Returns the parameter with the specified quantity.
[in] | self | - self |
[in] | name | - the name of the parameter |
int Cartesian_getParameterCount | ( | Cartesian_t * | self | ) |
Return the number of parameters.
[in] | self | - self |
RaveList_t * Cartesian_getParameterNames | ( | Cartesian_t * | self | ) |
Returns a list of parameter names.
[in] | self | - self |
const char * Cartesian_getProdname | ( | Cartesian_t * | cartesian | ) |
Returns the product name.
[in] | cartesian | - self |
Rave_ProductType Cartesian_getProduct | ( | Cartesian_t * | cartesian | ) |
Returns the product this cartesian represents.
[in] | cartesian | - self |
Projection_t * Cartesian_getProjection | ( | Cartesian_t * | cartesian | ) |
Returns a copy of the projection that is used for this cartesian product.
I.e. remember to release it.
[in] | cartesian | - the cartesian product |
const char * Cartesian_getProjectionString | ( | Cartesian_t * | cartesian | ) |
Returns the projection string defining this cartesian product.
[in] | cartesian | - self |
RaveField_t * Cartesian_getQualityField | ( | Cartesian_t * | cartesian, |
int | index ) |
Returns the quality field at the specified location.
[in] | cartesian | - self |
[in] | index | - the index |
RaveField_t * Cartesian_getQualityFieldByHowTask | ( | Cartesian_t * | cartesian, |
const char * | name ) |
Returns a quality field based on the value of how/task that should be a string.
[in] | cartesian | - cartesian |
[in] | value | - the value of the how/task attribute |
RaveObjectList_t * Cartesian_getQualityFields | ( | Cartesian_t * | cartesian | ) |
Returns all quality fields belonging to this cartesian.
The returned object is only a reference so do not modify it.
[in] | cartesian | - self |
int Cartesian_getQualityValueAtLocation | ( | Cartesian_t * | cartesian, |
double | lx, | ||
double | ly, | ||
const char * | name, | ||
double * | v ) |
Returns the quality value at the specified location from the specified quality field.
First the code tests if the quality field exist in the default param. If not, it will check for the quality field in self.
[in] | cartesian | - self |
[in] | lx | - the position as defined in the area definition |
[in] | ly | - the position as defined in the area definition |
[in] | name | - the name of the quality field (how/task) |
[out] | v | - the data at the specified position |
int Cartesian_getQualityValueAtLonLat | ( | Cartesian_t * | cartesian, |
double | lon, | ||
double | lat, | ||
const char * | name, | ||
double * | v ) |
Returns the quality value at the specified lon/lat from the specified quality field.
First the code tests if the quality field exist in the default param. If not, it will check for the quality field in self.
[in] | cartesian | - self |
[in] | lon | - the longitude in radians |
[in] | lat | - the latitude in radians |
[in] | name | - the name of the quality field (how/task) |
[out] | v | - the data at the specified position |
const char * Cartesian_getSource | ( | Cartesian_t * | cartesian | ) |
Returns the source.
[in] | cartesian | - self |
const char * Cartesian_getStartDate | ( | Cartesian_t * | cartesian | ) |
Returns the start date.
[in] | cartesian | - self |
const char * Cartesian_getStartTime | ( | Cartesian_t * | cartesian | ) |
Returns the start time.
[in] | cartesian | - self |
const char * Cartesian_getTime | ( | Cartesian_t * | cartesian | ) |
Returns the nominal time.
[in] | cartesian | - self |
double Cartesian_getUndetect | ( | Cartesian_t * | self | ) |
Returns the undetect value.
[in] | self | - self |
RaveValueType Cartesian_getValue | ( | Cartesian_t * | cartesian, |
long | x, | ||
long | y, | ||
double * | v ) |
Returns the value at the specified x and y position.
[in] | cartesian | - the cartesian product |
[in] | x | - the x index |
[in] | y | - the y index |
[out] | v | - the data at the specified index |
RaveValueType Cartesian_getValueAtLocation | ( | Cartesian_t * | cartesian, |
double | lx, | ||
double | ly, | ||
double * | v ) |
Returns the value from the location as defined by the area definition.
Same as calling Cartesian_getValue(c, Cartesian_getIndexX(c), Cartesian_getIndexY(c), &v).
[in] | cartesian | - self |
[in] | lx | - the position as defined in the area definition |
[in] | ly | - the position as defined in the area definition |
[out] | v | - the data at the specified position |
double Cartesian_getXScale | ( | Cartesian_t * | cartesian | ) |
Returns the xscale.
[in] | cartesian | - the cartesian product |
long Cartesian_getXSize | ( | Cartesian_t * | cartesian | ) |
Returns the xsize.
[in] | cartesian | - the cartesian product |
int Cartesian_getXYFromLonLat | ( | Cartesian_t * | self, |
double | lon, | ||
double | lat, | ||
int * | x, | ||
int * | y ) |
Converts a lon/lat position into a x/y position.
[in] | lon | - the lon coordinate |
[in] | lat | - the lat coordinate |
[out] | x | - the x position, will be >= 0 and < xsize. |
[out] | y | - the y position, will be >= 0 and < ysize. |
int Cartesian_getXYLocationFromLonLat | ( | Cartesian_t * | self, |
double | lon, | ||
double | lat, | ||
double * | x, | ||
double * | y ) |
Converts a lon/lat position into a x/y cartesian coordinate.
[in] | lon | - the lon coordinate |
[in] | lat | - the lat coordinate |
[out] | x | - the cartesian x coordinate, should be inside x-extent. |
[out] | y | - the cartesian y coordinate, should be inside y-extent. |
double Cartesian_getYScale | ( | Cartesian_t * | cartesian | ) |
Returns the yscale.
[in] | cartesian | - the cartesian product |
long Cartesian_getYSize | ( | Cartesian_t * | cartesian | ) |
Returns the ysize.
[in] | cartesian | - the cartesian product |
int Cartesian_hasAttribute | ( | Cartesian_t * | cartesian, |
const char * | name ) |
Returns if the cartesian product has got the specified attribute.
[in] | cartesian | - self |
[in] | name | - what to look for |
int Cartesian_hasParameter | ( | Cartesian_t * | self, |
const char * | name ) |
Returns if the product contains the specified parameter or not.
[in] | self | - self |
[in] | name | - the quantity name |
void Cartesian_init | ( | Cartesian_t * | cartesian, |
Area_t * | area ) |
Initializes this cartesian product with basic information.
No parameter is created but the dimensions and projection information is setup.
[in] | cartesian | - self |
[in] | area | - the area |
int Cartesian_isTransformable | ( | Cartesian_t * | cartesian | ) |
Verifies that all preconditions are met in order to perform a transformation.
[in] | cartesian | - the cartesian product |
void Cartesian_removeParameter | ( | Cartesian_t * | self, |
const char * | name ) |
Removes the parameter with the specified quantity.
[in] | self | - self |
[in] | name | - the quantity name |
void Cartesian_removeQualityField | ( | Cartesian_t * | cartesian, |
int | index ) |
Removes the quality field at the specified location.
[in] | cartesian | - self |
[in] | index | - the index |
void Cartesian_setAreaExtent | ( | Cartesian_t * | cartesian, |
double | llX, | ||
double | llY, | ||
double | urX, | ||
double | urY ) |
Sets the area extent for this cartesian product.
[in] | cartesian | - the cartesian product |
[in] | llX | - lower left X position |
[in] | llY | - lower left Y position |
[in] | urX | - upper right X position |
[in] | urY | - upper right Y position |
int Cartesian_setConvertedValue | ( | Cartesian_t * | cartesian, |
long | x, | ||
long | y, | ||
double | v ) |
Scales the value v according to gain and offset before setting it.
I.e. same as Cartesian_setValue(cartesian, x, y, (v - offset)/gain)
int Cartesian_setDate | ( | Cartesian_t * | cartesian, |
const char * | value ) |
Sets the nominal date.
[in] | cartesian | - self |
[in] | value | - the date in the format YYYYMMDD |
int Cartesian_setDefaultParameter | ( | Cartesian_t * | self, |
const char * | name ) |
Sets the default parameter.
[in] | self | - self |
[in] | name | - the quantity, e.g. DBZH |
int Cartesian_setEndDate | ( | Cartesian_t * | cartesian, |
const char * | value ) |
Sets the end date.
[in] | cartesian | - self |
[in] | value | - the date in the format YYYYMMDD |
int Cartesian_setEndTime | ( | Cartesian_t * | cartesian, |
const char * | value ) |
Sets the end time.
[in] | cartesian | - self |
[in] | value | - the time in the format HHmmss |
int Cartesian_setObjectType | ( | Cartesian_t * | self, |
Rave_ObjectType | type ) |
Sets the object type this cartesian product should represent.
[in] | self | - self |
[in] | type | - the object type |
int Cartesian_setProdname | ( | Cartesian_t * | cartesian, |
const char * | value ) |
Sets the product name.
[in] | cartesian | - self |
[in] | value | - the product name |
int Cartesian_setProduct | ( | Cartesian_t * | cartesian, |
Rave_ProductType | type ) |
Sets the product this cartesian represents.
[in] | cartesian | self |
[in] | type | - the product type |
int Cartesian_setProjection | ( | Cartesian_t * | cartesian, |
Projection_t * | projection ) |
Sets the projection that defines this cartesian product.
Will also necessary pipelines internally
[in] | cartesian | - the cartesian product |
[in] | projection | - the projection |
int Cartesian_setSource | ( | Cartesian_t * | cartesian, |
const char * | value ) |
Sets the source.
[in] | cartesian | - self |
[in] | value | - the source |
int Cartesian_setStartDate | ( | Cartesian_t * | cartesian, |
const char * | value ) |
Sets the start date.
[in] | cartesian | - self |
[in] | value | - the date in the format YYYYMMDD |
int Cartesian_setStartTime | ( | Cartesian_t * | cartesian, |
const char * | value ) |
Sets the start time.
[in] | cartesian | - self |
[in] | value | - the time in the format HHmmss |
int Cartesian_setTime | ( | Cartesian_t * | cartesian, |
const char * | value ) |
Sets the nominal time.
[in] | cartesian | - self |
[in] | value | - the time in the format HHmmss |
int Cartesian_setValue | ( | Cartesian_t * | cartesian, |
long | x, | ||
long | y, | ||
double | v ) |
Sets the value at the specified coordinates.
[in] | cartesian | - the cartesian product |
[in] | x | - the x-position |
[in] | y | - the y-position |
[in] | v | - the value to set |
void Cartesian_setXScale | ( | Cartesian_t * | cartesian, |
double | xscale ) |
Sets the xscale.
[in] | cartesian | - the cartesian product |
[in] | xscale | - the xscale |
void Cartesian_setXSize | ( | Cartesian_t * | self, |
long | xsize ) |
The xsize to use for the parameters.
[in] | self | - self |
[in] | xsize | - the xsize to use |
void Cartesian_setYScale | ( | Cartesian_t * | cartesian, |
double | yscale ) |
Sets the yscale.
[in] | cartesian | - the cartesian product |
[in] | yscale | - the yscale |
void Cartesian_setYSize | ( | Cartesian_t * | self, |
long | ysize ) |
The ysize to use for the parameters.
[in] | self | - self |
[in] | ysize | - the ysize to use |
RaveCoreObjectType Cartesian_TYPE |
Type definition to use when creating a rave object.