RAVE
transform.c File Reference

Defines the functions available when transforming between different types of products. More...

#include "transform.h"
#include "cartesian.h"
#include "projection.h"
#include "projection_pipeline.h"
#include "rave_attribute.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include "rave_utilities.h"
#include <string.h>
#include <math.h>
#include <stdio.h>

Classes

struct  _Transform_t
 Represents one transformator. More...
 

Functions

int TransformInternal_verifySameParameterNames (RaveList_t *expected, RaveList_t *actual)
 
int TransformInternal_verifyCombineTilesObjects (RaveObjectList_t *tiles)
 
int Transform_setMethod (Transform_t *transform, RaveTransformationMethod method)
 Sets the transformation method to be used, like NEAREST, BILINEAR, ...
 
RaveTransformationMethod Transform_getMethod (Transform_t *transform)
 Returns the transformation method.
 
int Transform_ppi (Transform_t *transform, PolarScan_t *scan, Cartesian_t *cartesian)
 Creates a ppi from a polar scan.
 
int Transform_cappi (Transform_t *transform, PolarVolume_t *pvol, Cartesian_t *cartesian, double height)
 Creates a cappi from a polar volume.
 
int Transform_pcappi (Transform_t *transform, PolarVolume_t *pvol, Cartesian_t *cartesian, double height)
 Creates a pseudo-cappi from a polar volume.
 
PolarScan_tTransform_ctoscan (Transform_t *transform, Cartesian_t *cartesian, RadarDefinition_t *def, double angle, const char *quantity)
 Mirrors a cartesian product into a polar scan.
 
PolarVolume_tTransform_ctop (Transform_t *transform, Cartesian_t *cartesian, RadarDefinition_t *def, const char *quantity)
 Mirrors a cartesian product into a polar volume.
 
Cartesian_tTransform_fillGap (Transform_t *transform, Cartesian_t *cartesian)
 Fills the gaps in a cartesian product.
 
CartesianParam_tTransform_fillGapOnParameter (Transform_t *transform, CartesianParam_t *param)
 Fills the gaps in a cartesian parameter.
 
CartesianParam_tTransform_accumulate (Transform_t *self, CartesianParam_t *param, double zr_a, double zr_b)
 Accumulated precipitation from reflectivity composites.
 
Cartesian_tTransform_combine_tiles (Transform_t *self, Area_t *area, RaveObjectList_t *tiles)
 Combines a number of tiles into the area defined by area.
 

Variables

RaveCoreObjectType Transform_TYPE
 Type definition to use when creating a rave object.
 

Detailed Description

Defines the functions available when transforming between different types of products.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2009-10-20

Function Documentation

◆ Transform_accumulate()

CartesianParam_t * Transform_accumulate ( Transform_t * self,
CartesianParam_t * param,
double zr_a,
double zr_b )

Accumulated precipitation from reflectivity composites.

Parameters
[in]self- self
[in]param- the cartesian parameter. Should contain

◆ Transform_cappi()

int Transform_cappi ( Transform_t * transform,
PolarVolume_t * pvol,
Cartesian_t * cartesian,
double height )

Creates a cappi from a polar volume.

Parameters
[in]transform- the transformer
[in]pvol- the polar volume
[in]cartesian- the cartesian product
[in]height- the height of the cappi
Returns
0 on failure, otherwise success

◆ Transform_combine_tiles()

Cartesian_t * Transform_combine_tiles ( Transform_t * self,
Area_t * area,
RaveObjectList_t * tiles )

Combines a number of tiles into the area defined by area.

This function should not be mixed up with functionality in cartesian composite. Instead this function will in a way concatenate the individual tiles into a big one. There is no overlapping functionallity or other clever ways to combine the different tiles.

Parameters
[in]self- self
[in]area- the resulting area
[in]tiles- the list of tiles
Returns
the complete cartesian product

◆ Transform_ctop()

PolarVolume_t * Transform_ctop ( Transform_t * transform,
Cartesian_t * cartesian,
RadarDefinition_t * def,
const char * quantity )

Mirrors a cartesian product into a polar volume.

Parameters
[in]transform- self
[in]cartesian- the source
[in]def- the volume definition
[in]quantity- what parameter that should be transformed
Returns
the volume on success otherwise NULL

◆ Transform_ctoscan()

PolarScan_t * Transform_ctoscan ( Transform_t * transform,
Cartesian_t * cartesian,
RadarDefinition_t * def,
double angle,
const char * quantity )

Mirrors a cartesian product into a polar scan.

Parameters
[in]transform- self
[in]cartesian- the source
[in]def- the scan definition
[in]angle- the elevation angle that should be used
[in]quantity- what parameter that should be transformed
Returns
the scan on success otherwise NULL

◆ Transform_fillGap()

Cartesian_t * Transform_fillGap ( Transform_t * transform,
Cartesian_t * cartesian )

Fills the gaps in a cartesian product.

Parameters
[in]transform- self
[in]cartesian- the product that should be gap filled
Returns
the filled cartesian or NULL on failure

◆ Transform_fillGapOnParameter()

CartesianParam_t * Transform_fillGapOnParameter ( Transform_t * transform,
CartesianParam_t * param )

Fills the gaps in a cartesian parameter.

Parameters
[in]transform- self
[in]param- the parameter that should be gap filled
Returns
the filled cartesian or NULL on failure

◆ Transform_getMethod()

RaveTransformationMethod Transform_getMethod ( Transform_t * transform)

Returns the transformation method.

Parameters
[in]transform- the transformer
Returns
the transformation method

◆ Transform_pcappi()

int Transform_pcappi ( Transform_t * transform,
PolarVolume_t * pvol,
Cartesian_t * cartesian,
double height )

Creates a pseudo-cappi from a polar volume.

Parameters
[in]transform- the transformer
[in]pvol- the polar volume
[in]cartesian- the cartesian product
[in]height- the height of the cappi
Returns
0 on failure, otherwise success

◆ Transform_ppi()

int Transform_ppi ( Transform_t * transform,
PolarScan_t * scan,
Cartesian_t * cartesian )

Creates a ppi from a polar scan.

Parameters
[in]transform- the transformer
[in]scan- the polar scan
[in]cartesian- the cartesian product
Returns
0 on failure, otherwise success

◆ Transform_setMethod()

int Transform_setMethod ( Transform_t * transform,
RaveTransformationMethod method )

Sets the transformation method to be used, like NEAREST, BILINEAR, ...

Parameters
[in]transform- the transformer
[in]method- the transformation method
Returns
0 if method is not known, otherwise the method was set

Variable Documentation

◆ Transform_TYPE

RaveCoreObjectType Transform_TYPE
Initial value:
= {
"Transform",
sizeof(Transform_t),
Transform_constructor,
Transform_destructor
}
struct _Transform_t Transform_t
Defines a transformer.
Definition transform.h:38

Type definition to use when creating a rave object.