BEAM BLOCKAGE
bbtopography.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2011 Swedish Meteorological and Hydrological Institute, SMHI,
3
4This file is part of beam blockage (beamb).
5
6beamb 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
11beamb 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 beamb. If not, see <http://www.gnu.org/licenses/>.
18------------------------------------------------------------------------*/
25#ifndef BBTOPOGRAPHY_H
26#define BBTOPOGRAPHY_H
27#include "rave_object.h"
28#include "rave_data2d.h"
29#include "polarscan.h"
30
35
39extern RaveCoreObjectType BBTopography_TYPE;
40
47
54
60void BBTopography_setXDim(BBTopography_t* self, double xdim);
61
68
74void BBTopography_setYDim(BBTopography_t* self, double ydim);
75
82
89
96
103
110
119int BBTopography_createData(BBTopography_t* self, long ncols, long nrows, RaveDataType type);
120
130int BBTopography_setData(BBTopography_t* self, long ncols, long nrows, void* data, RaveDataType type);
137
144int BBTopography_setDatafield(BBTopography_t* self, RaveData2D_t* datafield);
145
153RaveData2D_t* BBTopography_getDatafield(BBTopography_t* self);
154
161
168
174RaveDataType BBTopography_getDataType(BBTopography_t* self);
175
184int BBTopography_getValue(BBTopography_t* self, long col, long row, double* v);
185
193int BBTopography_setValue(BBTopography_t* self, long col, long row, double value);
194
206int BBTopography_getValueAtLonLat(BBTopography_t* self, double lon, double lat, double* v);
207
219
231
232#endif /* BBTOPOGRAPHY_H */
BBTopography_t * BBTopography_concatX(BBTopography_t *self, BBTopography_t *other)
Concatenates two topography fields horizontally with each other.
Definition bbtopography.c:276
void BBTopography_setXDim(BBTopography_t *self, double xdim)
Sets the x-scale in radians.
Definition bbtopography.c:121
double BBTopography_getNodata(BBTopography_t *self)
Return the nodata value.
Definition bbtopography.c:115
void BBTopography_setYDim(BBTopography_t *self, double ydim)
Sets the y-scale in radians.
Definition bbtopography.c:134
long BBTopography_getNcols(BBTopography_t *self)
Returns the number of columns.
Definition bbtopography.c:219
int BBTopography_setValue(BBTopography_t *self, long col, long row, double value)
Sets the value at specified position.
Definition bbtopography.c:243
int BBTopography_getValueAtLonLat(BBTopography_t *self, double lon, double lat, double *v)
Returns the value at the specified lon/lat coordinate.
Definition bbtopography.c:249
int BBTopography_createData(BBTopography_t *self, long ncols, long nrows, RaveDataType type)
Creates a empty data field.
Definition bbtopography.c:170
void BBTopography_setNodata(BBTopography_t *self, double nodata)
Sets the nodata value.
Definition bbtopography.c:109
int BBTopography_setDatafield(BBTopography_t *self, RaveData2D_t *datafield)
Sets the rave data 2d field.
Definition bbtopography.c:188
double BBTopography_getXDim(BBTopography_t *self)
Return the x-scale in radians.
Definition bbtopography.c:127
void * BBTopography_getData(BBTopography_t *self)
Returns a pointer to the internal data storage.
Definition bbtopography.c:182
void BBTopography_setUlymap(BBTopography_t *self, double ulymap)
Sets the upper left y-coordinate (latitude) in the topography map (in radians).
Definition bbtopography.c:158
double BBTopography_getUlymap(BBTopography_t *self)
Return the upper left y-coordinate (latitude) in the topography map (in radians).
Definition bbtopography.c:164
double BBTopography_getUlxmap(BBTopography_t *self)
Return the upper left x-coordinate (longitude) in the topography map (in radians).
Definition bbtopography.c:152
RaveDataType BBTopography_getDataType(BBTopography_t *self)
Returns the data type.
Definition bbtopography.c:231
RaveData2D_t * BBTopography_getDatafield(BBTopography_t *self)
Returns the 2d field associated with this topography field.
Definition bbtopography.c:205
long BBTopography_getNrows(BBTopography_t *self)
Returns the number of rows.
Definition bbtopography.c:225
int BBTopography_setData(BBTopography_t *self, long ncols, long nrows, void *data, RaveDataType type)
Sets the data in the topography field.
Definition bbtopography.c:176
int BBTopography_getValue(BBTopography_t *self, long col, long row, double *v)
Returns the value at the specified index.
Definition bbtopography.c:237
void BBTopography_setUlxmap(BBTopography_t *self, double ulxmap)
Sets the upper left x-coordinate (longitude) in the topography map (in radians).
Definition bbtopography.c:146
BBTopography_t * BBTopography_concatY(BBTopography_t *self, BBTopography_t *other)
Concatenates two topography fields vertically with each other.
Definition bbtopography.c:314
RaveCoreObjectType BBTopography_TYPE
Type definition to use when creating a rave object.
Definition bbtopography.c:354
double BBTopography_getYDim(BBTopography_t *self)
Return the y-scale in radians.
Definition bbtopography.c:140
Represents the beam blockage topography.
Definition bbtopography.c:34
double xdim
the x step size (radians)
Definition bbtopography.c:40
double ulxmap
the upper left x-coordinate (longitude / radians)
Definition bbtopography.c:38
double ydim
the y step size (radians)
Definition bbtopography.c:41
double nodata
the nodata
Definition bbtopography.c:37
RAVE_OBJECT_HEAD RaveData2D_t * data
Always on top.
Definition bbtopography.c:36
double ulymap
the upper left x-coordinate(latitude / radians)
Definition bbtopography.c:39