BEAM BLOCKAGE
bbtopography.h File Reference

Beam-blockage topography field. More...

#include "rave_object.h"
#include "rave_data2d.h"
#include "polarscan.h"

Go to the source code of this file.

Typedefs

typedef struct _BBTopography_t BBTopography_t
 Defines a beam blockage object.
 

Functions

void BBTopography_setNodata (BBTopography_t *self, double nodata)
 Sets the nodata value.
 
double BBTopography_getNodata (BBTopography_t *self)
 Return the nodata value.
 
void BBTopography_setXDim (BBTopography_t *self, double xdim)
 Sets the x-scale in radians.
 
double BBTopography_getXDim (BBTopography_t *self)
 Return the x-scale in radians.
 
void BBTopography_setYDim (BBTopography_t *self, double ydim)
 Sets the y-scale in radians.
 
double BBTopography_getYDim (BBTopography_t *self)
 Return the y-scale in radians.
 
void BBTopography_setUlxmap (BBTopography_t *self, double ulxmap)
 Sets the upper left x-coordinate (longitude) in the topography map (in radians).
 
double BBTopography_getUlxmap (BBTopography_t *self)
 Return the upper left x-coordinate (longitude) in the topography map (in radians).
 
void BBTopography_setUlymap (BBTopography_t *self, double ulymap)
 Sets the upper left y-coordinate (latitude) in the topography map (in radians).
 
double BBTopography_getUlymap (BBTopography_t *self)
 Return the upper left y-coordinate (latitude) in the topography map (in radians).
 
int BBTopography_createData (BBTopography_t *self, long ncols, long nrows, RaveDataType type)
 Creates a empty data field.
 
int BBTopography_setData (BBTopography_t *self, long ncols, long nrows, void *data, RaveDataType type)
 Sets the data in the topography field.
 
void * BBTopography_getData (BBTopography_t *self)
 Returns a pointer to the internal data storage.
 
int BBTopography_setDatafield (BBTopography_t *self, RaveData2D_t *datafield)
 Sets the rave data 2d field.
 
RaveData2D_t * BBTopography_getDatafield (BBTopography_t *self)
 Returns the 2d field associated with this topography field.
 
long BBTopography_getNcols (BBTopography_t *self)
 Returns the number of columns.
 
long BBTopography_getNrows (BBTopography_t *self)
 Returns the number of rows.
 
RaveDataType BBTopography_getDataType (BBTopography_t *self)
 Returns the data type.
 
int BBTopography_getValue (BBTopography_t *self, long col, long row, double *v)
 Returns the value at the specified index.
 
int BBTopography_setValue (BBTopography_t *self, long col, long row, double value)
 Sets the value at specified position.
 
int BBTopography_getValueAtLonLat (BBTopography_t *self, double lon, double lat, double *v)
 Returns the value at the specified lon/lat coordinate.
 
BBTopography_tBBTopography_concatX (BBTopography_t *self, BBTopography_t *other)
 Concatenates two topography fields horizontally with each other.
 
BBTopography_tBBTopography_concatY (BBTopography_t *self, BBTopography_t *other)
 Concatenates two topography fields vertically with each other.
 

Variables

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

Detailed Description

Beam-blockage topography field.

Author
Anders Henja (SMHI)
Date
2011-11-16

Typedef Documentation

◆ BBTopography_t

Defines a beam blockage object.

Function Documentation

◆ BBTopography_concatX()

BBTopography_t * BBTopography_concatX ( BBTopography_t * self,
BBTopography_t * other )

Concatenates two topography fields horizontally with each other.

The field's and other's y-dimension must be the same as well as the data type. It is also necessary that ydim and xdim are the same. All other attribute values will be taken from the first field.

Parameters
[in]self- self
[in]other- the field to contatenate
Returns
the concatenated field on success otherwise NULL

◆ BBTopography_concatY()

BBTopography_t * BBTopography_concatY ( BBTopography_t * self,
BBTopography_t * other )

Concatenates two topography fields vertically with each other.

The field's and other's x-dimension must be the same as well as the data type. It is also necessary that ydim and xdim are the same. All other attribute values will be taken from the first field.

Parameters
[in]self- self
[in]other- the field to contatenate
Returns
the concatenated field on success otherwise NULL

◆ BBTopography_createData()

int BBTopography_createData ( BBTopography_t * self,
long ncols,
long nrows,
RaveDataType type )

Creates a empty data field.

Parameters
[in]self- self
[in]ncols- the ncols
[in]nrows- the nrows
[in]type- the data type
Returns
1 on success otherwise 0

◆ BBTopography_getData()

void * BBTopography_getData ( BBTopography_t * self)

Returns a pointer to the internal data storage.

Parameters
[in]self- self
Returns
the internal data pointer (NOTE! Do not release this pointer)

◆ BBTopography_getDatafield()

RaveData2D_t * BBTopography_getDatafield ( BBTopography_t * self)

Returns the 2d field associated with this topography field.

Note, it is a clone so don't expect that any modifications will modify the rave fields data array.

Parameters
[in]field- self
Returns
a clone of the internal data array on success otherwise NULL

◆ BBTopography_getDataType()

RaveDataType BBTopography_getDataType ( BBTopography_t * self)

Returns the data type.

Parameters
[in]self- self
Returns
the data type

◆ BBTopography_getNcols()

long BBTopography_getNcols ( BBTopography_t * self)

Returns the number of columns.

Parameters
[in]self- self
Returns
the number of columns

◆ BBTopography_getNodata()

double BBTopography_getNodata ( BBTopography_t * self)

Return the nodata value.

Parameters
[in]self- self
Returns
the nodata value

◆ BBTopography_getNrows()

long BBTopography_getNrows ( BBTopography_t * self)

Returns the number of rows.

Parameters
[in]self- self
Returns
the number of rows

◆ BBTopography_getUlxmap()

double BBTopography_getUlxmap ( BBTopography_t * self)

Return the upper left x-coordinate (longitude) in the topography map (in radians).

Parameters
[in]self- self
Returns
the upper left x-coordinate (longitude in radians))

◆ BBTopography_getUlymap()

double BBTopography_getUlymap ( BBTopography_t * self)

Return the upper left y-coordinate (latitude) in the topography map (in radians).

Parameters
[in]self- self
Returns
the upper left y-coordinate (latitude in radians))

◆ BBTopography_getValue()

int BBTopography_getValue ( BBTopography_t * self,
long col,
long row,
double * v )

Returns the value at the specified index.

Parameters
[in]self- self
[in]col- the column
[in]row- the row
[out]v- the data at the specified index
Returns
1 on success, 0 otherwise

◆ BBTopography_getValueAtLonLat()

int BBTopography_getValueAtLonLat ( BBTopography_t * self,
double lon,
double lat,
double * v )

Returns the value at the specified lon/lat coordinate.

If outside boundaries or if there is no data at provided coordinate the returned value will be 0 but v will still be set to nodata.

Parameters
[in]self- self
[in]lon- the longitude
[in]lat- the latitude
[out]v- the value at specified position
Returns
the outcome of the operation.

◆ BBTopography_getXDim()

double BBTopography_getXDim ( BBTopography_t * self)

Return the x-scale in radians.

Parameters
[in]self- self
Returns
the x-scale (step size) in radians

◆ BBTopography_getYDim()

double BBTopography_getYDim ( BBTopography_t * self)

Return the y-scale in radians.

Parameters
[in]self- self
Returns
the y-scale (step size) in radians

◆ BBTopography_setData()

int BBTopography_setData ( BBTopography_t * self,
long ncols,
long nrows,
void * data,
RaveDataType type )

Sets the data in the topography field.

Parameters
[in]self- self
[in]ncols- the column count
[in]nrows- the row count
[in]data- the data
[in]type- the data type
Returns
1 on success otherwise 0

◆ BBTopography_setDatafield()

int BBTopography_setDatafield ( BBTopography_t * self,
RaveData2D_t * datafield )

Sets the rave data 2d field.

This will create a clone from the provided data field.

Parameters
[in]self- self
[in]datafield- the data field to use (MAY NOT BE NULL)
Returns
1 on success otherwise 0

◆ BBTopography_setNodata()

void BBTopography_setNodata ( BBTopography_t * self,
double nodata )

Sets the nodata value.

Parameters
[in]self- self
[in]nodata- the nodata value

◆ BBTopography_setUlxmap()

void BBTopography_setUlxmap ( BBTopography_t * self,
double ulxmap )

Sets the upper left x-coordinate (longitude) in the topography map (in radians).

Parameters
[in]self- self
[in]ulxmap- the upper left x-coordinate (longitude in radians))

◆ BBTopography_setUlymap()

void BBTopography_setUlymap ( BBTopography_t * self,
double ulymap )

Sets the upper left y-coordinate (latitude) in the topography map (in radians).

Parameters
[in]self- self
[in]ulxmap- the upper left y-coordinate (latitude in radians))

◆ BBTopography_setValue()

int BBTopography_setValue ( BBTopography_t * self,
long col,
long row,
double value )

Sets the value at specified position.

Parameters
[in]self- self
[in]col- the column
[in]row- the row
[in]value- the value to be set at specified coordinate

◆ BBTopography_setXDim()

void BBTopography_setXDim ( BBTopography_t * self,
double xdim )

Sets the x-scale in radians.

Parameters
[in]self- self
[in]xdim- the x-scale (step-size) in radians

◆ BBTopography_setYDim()

void BBTopography_setYDim ( BBTopography_t * self,
double ydim )

Sets the y-scale in radians.

Parameters
[in]self- self
[in]ydim- the y-scale (step-size) in radians

Variable Documentation

◆ BBTopography_TYPE

RaveCoreObjectType BBTopography_TYPE
extern

Type definition to use when creating a rave object.