RAVE
polarvolume.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2009 Swedish Meteorological and Hydrological Institute, SMHI,
3
4This file is part of RAVE.
5
6RAVE 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
11RAVE 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 RAVE. If not, see <http://www.gnu.org/licenses/>.
18------------------------------------------------------------------------*/
19
27#ifndef POLARVOLUME_H
28#define POLARVOLUME_H
29#include "polarscan.h"
30#include "projection.h"
31#include "rave_object.h"
32#include "raveobject_list.h"
33
38
43
50int PolarVolume_setTime(PolarVolume_t* pvol, const char* value);
51
57const char* PolarVolume_getTime(PolarVolume_t* pvol);
58
65int PolarVolume_setDate(PolarVolume_t* pvol, const char* value);
66
72const char* PolarVolume_getDate(PolarVolume_t* pvol);
73
80int PolarVolume_setSource(PolarVolume_t* pvol, const char* value);
81
87const char* PolarVolume_getSource(PolarVolume_t* pvol);
88
94void PolarVolume_setLongitude(PolarVolume_t* pvol, double lon);
95
102
108void PolarVolume_setLatitude(PolarVolume_t* pvol, double lat);
109
116
122void PolarVolume_setHeight(PolarVolume_t* pvol, double height);
123
130
138void PolarVolume_setBeamwidth(PolarVolume_t* pvol, double bw);
139
146
152void PolarVolume_setBeamwH(PolarVolume_t* self, double beamwidth);
153
160
166void PolarVolume_setBeamwV(PolarVolume_t* self, double beamwidth);
167
174
182double PolarVolume_getDistance(PolarVolume_t* pvol, double lon, double lat);
183
190
197
205
213
222
230
237
244int PolarVolume_removeScan(PolarVolume_t* pvol, int index);
245
256
264
274void PolarVolume_getLonLatNavigationInfo(PolarVolume_t* pvol, double lon, double lat, double height, PolarNavigationInfo* info);
275
280PolarNavigationInfo* PolarVolume_getVerticalLonLatNavigationInfo(PolarVolume_t* pvol, double lon, double lat, int *nrNavInfo);
281
292RaveValueType PolarVolume_getNearest(PolarVolume_t* pvol, double lon, double lat, double height, int insidee, double* v);
293
305RaveValueType PolarVolume_getNearestParameterValue(PolarVolume_t* pvol, const char* quantity, double lon, double lat, double height, int insidee, double* v);
306
317RaveValueType PolarVolume_getConvertedVerticalMaxValue(PolarVolume_t* self, const char* quantity, double lon, double lat, double* v, PolarNavigationInfo* navinfo);
318
328RaveValueType PolarVolume_getConvertedParameterValueAt(PolarVolume_t* pvol, const char* quantity, int ei, int ri, int ai, double* v);
329
340int PolarVolume_getNearestNavigationInfo(PolarVolume_t* pvol, double lon, double lat, double height, int insidee, PolarNavigationInfo* navinfo);
341
363 PolarVolume_t* pvol,
364 double lon,
365 double lat,
366 double height,
367 int insidee,
368 int surroundingScans,
369 int surroundingRangeBins,
370 int surroundingRays,
371 PolarNavigationInfo navinfos[]);
372
386 PolarVolume_t* pvol,
387 PolarScan_t* scan,
388 PolarNavigationInfo navinfos[],
389 int noofNavinfos,
390 int startNavInfoIndex);
391
404RaveValueType PolarVolume_getNearestConvertedParameterValue(PolarVolume_t* pvol, const char* quantity, double lon, double lat, double height, int insidee, double* v, PolarNavigationInfo* navinfo);
405
419int PolarVolume_getQualityValueAt(PolarVolume_t* pvol, const char* quantity, int ei, int ri, int ai, const char* name, int convert, double* v);
420
430int PolarVolume_setDefaultParameter(PolarVolume_t* pvol, const char* quantity);
431
438
444void PolarVolume_sortByElevations(PolarVolume_t* pvol, int ascending);
445
452
460
474 RaveAttribute_t* attribute);
475
485 RaveAttribute_t* attribute, RaveIO_ODIM_Version version);
486
494 const char* name);
495
505 const char* name, RaveIO_ODIM_Version version);
506
512void PolarVolume_removeAttribute(PolarVolume_t* pvol, const char* attrname);
513
520
529
536
545
552int PolarVolume_hasAttribute(PolarVolume_t* pvol, const char* name);
553
560
568PolarScan_t* PolarVolume_findScanWithQualityFieldByHowTask(PolarVolume_t* pvol, const char* howtaskvalue, const char* quantity);
569
578
589
600
609PolarObservation* PolarVolume_getCorrectedValuesAtHeight(PolarVolume_t* self, double height, double gap, int* nobservations);
610
618
627
635
636
637
638#endif
Defines the functions available when working with polar scans.
const char * PolarVolume_getSource(PolarVolume_t *pvol)
Returns the source.
Definition polarvolume.c:360
int PolarVolume_useAzimuthalNavInformation(PolarVolume_t *self)
Returns if the azimuthal nav information should be used or not.
Definition polarvolume.c:1367
const char * PolarVolume_getTime(PolarVolume_t *pvol)
Returns the nominal time.
Definition polarvolume.c:322
double PolarVolume_getBeamwV(PolarVolume_t *self)
Returns the vertical beamwidth.
Definition polarvolume.c:454
void PolarVolume_setHeight(PolarVolume_t *pvol, double height)
Sets the height for the volume.
Definition polarvolume.c:390
RaveField_t * PolarVolume_getHeightField(PolarVolume_t *self)
Gets the height field for self.
Definition polarvolume.c:1283
void PolarVolume_removeAttribute(PolarVolume_t *pvol, const char *attrname)
Removes a rave attribute from the volume.
Definition polarvolume.c:1088
double PolarVolume_getBeamwH(PolarVolume_t *self)
Returns the horizontal beamwidth.
Definition polarvolume.c:435
Projection_t * PolarVolume_getProjection(PolarVolume_t *pvol)
Returns a copy of the projection that is used for this polar volume.
Definition polarvolume.c:524
PolarObservation * PolarVolume_getCorrectedValuesAtHeight(PolarVolume_t *self, double height, double gap, int *nobservations)
Returns all observations at the specified height inside the specified gap.
Definition polarvolume.c:1288
int PolarVolume_isAscendingScans(PolarVolume_t *pvol)
Verifies that the scans are sorted in ascending order.
Definition polarvolume.c:1005
int PolarVolume_setDate(PolarVolume_t *pvol, const char *value)
Sets the nominal date.
Definition polarvolume.c:328
double PolarVolume_getHeight(PolarVolume_t *pvol)
Returns the height for the volume.
Definition polarvolume.c:396
PolarScan_t * PolarVolume_getScan(PolarVolume_t *pvol, int index)
Returns the scan at given index.
Definition polarvolume.c:567
int PolarVolume_isValid(PolarVolume_t *pvol)
Validates the volume regarding storage.
Definition polarvolume.c:1143
double PolarVolume_getBeamwidth(PolarVolume_t *pvol)
Returns the beam width for the volume.
Definition polarvolume.c:416
RaveCoreObjectType PolarVolume_TYPE
Type definition to use when creating a rave object.
Definition polarvolume.c:1409
int PolarVolume_getNearestNavigationInfo(PolarVolume_t *pvol, double lon, double lat, double height, int insidee, PolarNavigationInfo *navinfo)
Returns the navigation nearest to specified lon/lat/height.
Definition polarvolume.c:817
RaveValueType PolarVolume_getConvertedParameterValueAt(PolarVolume_t *pvol, const char *quantity, int ei, int ri, int ai, double *v)
Returns the converted parameter value at the specified location.
Definition polarvolume.c:801
void PolarVolume_setUseAzimuthalNavInformation(PolarVolume_t *self, int v)
Utility function for setting all scans in this volume to use or not use azimuthal navigation.
Definition polarvolume.c:1352
PolarScan_t * PolarVolume_getScanClosestToElevation(PolarVolume_t *pvol, double e, int inside)
Returns the scan with elevation closest to the specified elevation.
Definition polarvolume.c:592
int PolarVolume_getSurroundingNavigationInfos(PolarVolume_t *pvol, double lon, double lat, double height, int insidee, int surroundingScans, int surroundingRangeBins, int surroundingRays, PolarNavigationInfo navinfos[])
Returns the navigation info structures representing positions closest surrounding the specfied lon/la...
Definition polarvolume.c:850
int PolarVolume_isTransformable(PolarVolume_t *pvol)
Verifies that all preconditions are met in order to perform a transformation.
Definition polarvolume.c:1026
void PolarVolume_setProjection(PolarVolume_t *pvol, Projection_t *projection)
Sets the projection for this polar volume.
Definition polarvolume.c:507
double PolarVolume_getMaxDistance(PolarVolume_t *pvol)
Returns the maximum distance (at ground level) that this volume will cover.
Definition polarvolume.c:466
int PolarVolume_setSource(PolarVolume_t *pvol, const char *value)
Sets the source.
Definition polarvolume.c:340
int PolarVolume_getNumberOfScans(PolarVolume_t *pvol)
Returns the number of scans.
Definition polarvolume.c:573
void PolarVolume_setLongitude(PolarVolume_t *pvol, double lon)
Sets the longitude for the volume.
Definition polarvolume.c:366
int PolarVolume_setDefaultParameter(PolarVolume_t *pvol, const char *quantity)
Sets the default parameter that should be used when operating on this volume unless the parameter (qu...
Definition polarvolume.c:964
int PolarVolume_addAttributeVersion(PolarVolume_t *pvol, RaveAttribute_t *attribute, RaveIO_ODIM_Version version)
Adds a rave attribute to the volume using version as well.
Definition polarvolume.c:1044
RaveList_t * PolarVolume_getAttributeNamesVersion(PolarVolume_t *pvol, RaveIO_ODIM_Version version)
Returns a list of attribute names for specified version.
Definition polarvolume.c:1119
PolarScan_t * PolarVolume_findScanWithQualityFieldByHowTask(PolarVolume_t *pvol, const char *howtaskvalue, const char *quantity)
Locates a scan with a quality field that has a how/task value == howtaskvalue.
Definition polarvolume.c:1174
PolarNavigationInfo * PolarVolume_getVerticalLonLatNavigationInfo(PolarVolume_t *pvol, double lon, double lat, int *nrNavInfo)
Returns an array of navigation info for all scans at the specified lon/lat.
Definition polarvolume.c:658
int PolarVolume_getQualityValueAt(PolarVolume_t *pvol, const char *quantity, int ei, int ri, int ai, const char *name, int convert, double *v)
Returns the quality value for the quality field that has a name matching the how/task attribute for t...
Definition polarvolume.c:951
PolarScan_t * PolarVolume_getScanWithMaxDistance(PolarVolume_t *pvol)
Returns the scan with the highest distance coverage (at ground level).
Definition polarvolume.c:484
void PolarVolume_setLatitude(PolarVolume_t *pvol, double lat)
Sets the latitude for the volume.
Definition polarvolume.c:378
int PolarVolume_setTime(PolarVolume_t *pvol, const char *value)
Sets the nominal time.
Definition polarvolume.c:316
const char * PolarVolume_getDate(PolarVolume_t *pvol)
Returns the nominal date.
Definition polarvolume.c:334
double PolarVolume_getDistance(PolarVolume_t *pvol, double lon, double lat)
Returns the distance from the radar to the specified lon/lat coordinate pair.
Definition polarvolume.c:460
RaveValueType PolarVolume_getNearestConvertedParameterValue(PolarVolume_t *pvol, const char *quantity, double lon, double lat, double height, int insidee, double *v, PolarNavigationInfo *navinfo)
Fetches the nearest converted parameter value for the specified position.
Definition polarvolume.c:927
RaveValueType PolarVolume_getConvertedVerticalMaxValue(PolarVolume_t *self, const char *quantity, double lon, double lat, double *v, PolarNavigationInfo *navinfo)
Returns the vertical max value at the specified lon/lat coordinate.
Definition polarvolume.c:750
void PolarVolume_setBeamwV(PolarVolume_t *self, double beamwidth)
Sets the vertical beamwidth.
Definition polarvolume.c:441
int PolarVolume_addScan(PolarVolume_t *pvol, PolarScan_t *scan)
Adds a scan to the volume.
Definition polarvolume.c:533
void PolarVolume_setBeamwH(PolarVolume_t *self, double beamwidth)
Sets the horizontal beamwidth.
Definition polarvolume.c:422
RaveObjectList_t * PolarVolume_getAttributeValuesVersion(PolarVolume_t *pvol, RaveIO_ODIM_Version version)
Returns a list of attribute values in specified version for attributes that has been set in this volu...
Definition polarvolume.c:1137
int PolarVolume_addAttribute(PolarVolume_t *pvol, RaveAttribute_t *attribute)
Adds a rave attribute to the volume.
Definition polarvolume.c:1038
double PolarVolume_getLatitude(PolarVolume_t *pvol)
Returns the latitude for the volume.
Definition polarvolume.c:384
void PolarVolume_addEiForNavInfos(PolarVolume_t *pvol, PolarScan_t *scan, PolarNavigationInfo navinfos[], int noofNavinfos, int startNavInfoIndex)
Adds elevation angle index information to a list of navigation info structures, based on an input sca...
Definition polarvolume.c:908
int PolarVolume_hasAttribute(PolarVolume_t *pvol, const char *name)
Returns if the volume has the specified attribute or not.
Definition polarvolume.c:1125
void PolarVolume_sortByElevations(PolarVolume_t *pvol, int ascending)
Arranges the scans in either ascending or descending elevation.
Definition polarvolume.c:994
void PolarVolume_setBeamwidth(PolarVolume_t *pvol, double bw)
Sets the beamwidth for the volume.
Definition polarvolume.c:402
RaveAttribute_t * PolarVolume_getAttribute(PolarVolume_t *pvol, const char *name)
Returns the rave attribute that is named accordingly.
Definition polarvolume.c:1072
int PolarVolume_removeParametersExcept(PolarVolume_t *self, RaveList_t *parameters)
Removes all parameters from all scans belongning to this volume except the ones specified in paramete...
Definition polarvolume.c:1387
int PolarVolume_removeScan(PolarVolume_t *pvol, int index)
Removes the scan at specified index.
Definition polarvolume.c:579
RaveValueType PolarVolume_getNearestParameterValue(PolarVolume_t *pvol, const char *quantity, double lon, double lat, double height, int insidee, double *v)
Fetches the nearest parameter value for the specified position.
Definition polarvolume.c:725
int PolarVolume_indexOf(PolarVolume_t *pvol, PolarScan_t *scan)
Returns the index in the list of scans of the specified scan.
Definition polarvolume.c:626
RaveAttribute_t * PolarVolume_getAttributeVersion(PolarVolume_t *pvol, const char *name, RaveIO_ODIM_Version version)
Returns the rave attribute that is named accordingly for specified version.
Definition polarvolume.c:1078
double PolarVolume_getLongitude(PolarVolume_t *pvol)
Returns the longitude for the volume.
Definition polarvolume.c:372
void PolarVolume_getLonLatNavigationInfo(PolarVolume_t *pvol, double lon, double lat, double height, PolarNavigationInfo *info)
Returns the navigation information that is the result from finding the lon/lat-coordinate at the spec...
Definition polarvolume.c:636
RaveValueType PolarVolume_getNearest(PolarVolume_t *pvol, double lon, double lat, double height, int insidee, double *v)
Fetches the value nearest to the specified position.
Definition polarvolume.c:701
RaveObjectList_t * PolarVolume_getAttributeValues(PolarVolume_t *pvol)
Returns a list of attribute values that should be stored for this volume.
Definition polarvolume.c:1131
RaveField_t * PolarVolume_getDistanceField(PolarVolume_t *self)
Gets the distance field for self.
Definition polarvolume.c:1278
PolarScan_t * PolarVolume_findAnyScanWithQualityFieldByHowTask(PolarVolume_t *pvol, const char *howtaskvalue)
Basically the same as PolarVolume_findScanWithQualityFieldByHowTask with the exception that all param...
Definition polarvolume.c:1194
const char * PolarVolume_getDefaultParameter(PolarVolume_t *pvol)
Returns the currently specified default parameter name.
Definition polarvolume.c:988
RaveList_t * PolarVolume_getAttributeNames(PolarVolume_t *pvol)
Returns a list of attribute names.
Definition polarvolume.c:1113
Wrapper around PROJ.4.
Generic implementation of an object that is used within rave.
RaveIO_ODIM_Version
The /Conventions version in a ODIM HDF5 file.
Definition rave_types.h:43
RaveValueType
Different value types.
Definition rave_types.h:72
Implementation of a rave object list that ensures that the objects contained within the list are rele...
Provides user with navigation information.
Definition rave_types.h:160
Definition rave_types.h:180
Represents one scan in a volume.
Definition polarscan.c:47
Represents a volume.
Definition polarvolume.c:51
RAVE_OBJECT_HEAD Projection_t * projection
Always on top.
Definition polarvolume.c:53
Represents one projection.
Definition projection.c:55
Represents one scan in a volume.
Definition rave_attribute.c:46
Represents the cartesian volume.
Definition rave_field.c:36
Represents a list.
Definition rave_list.c:36
Represents a list.
Definition raveobject_list.c:35
The rave object type definition.
Definition rave_object.h:52