31 #ifndef RADAR_DATA_PICKER_H
32 #define RADAR_DATA_PICKER_H
35 #include <drain/TypeUtils.h>
39 #include "drain/image/Sampler.h"
40 #include "drain/image/AccumulatorGeo.h"
41 #include "data/Data.h"
44 #include "RadarProj.h"
84 typedef std::map<std::string, const data_t &>
map_t;
93 if ((value != data.odim.nodata) && (value != data.odim.undetect)){
94 value = data.odim.scaleForward(value);
105 void toOStr(std::ostream &ostr = std::cout)
const {
107 ostr << drain::TypeName<rack::RadarDataPicker<OD> >::name;
108 ostr << this->width <<
"x" << this->height <<
"; " << this->ref <<
"; " <<
odim <<
'\n';
163 const RadarProj & getProjection()
const {
A map of references to base type scalars, arrays or std::string; changing values in either are equiva...
Definition: ReferenceMap.h:67
ref_t & link(const std::string &key, F &x)
Associates a map entry with a variable.
Definition: ReferenceMap.h:82
Array with georeferencing support.
Definition: GeoFrame.h:58
Definition: RadarDataPicker.h:203
void setPosition(int i, int j) const
Sets image position (in 2D Cartesian space) and calculates corresponding geographical coordinates.
Definition: RadarDataPicker.cpp:150
CartesianDataPicker(drain::ReferenceMap2<> &variableMap, const CartesianODIM &odim)
Default constructor.
Definition: RadarDataPicker.cpp:93
GeoFrame frame
Frame for converting coordinates.
Definition: RadarDataPicker.h:214
Metadata structure for Cartesian radar data products (single-radar or composites).
Definition: CartesianODIM.h:47
A map of radar data, indexed by quantity code (DBZH, VRAD, etc).
Definition: Data.h:1213
Essential class for storing radar data.
Definition: Data.h:302
Definition: RadarDataPicker.h:149
virtual void setPosition(int i, int j) const
Sets image position and calculates corresponding geographical coordinates.
Definition: RadarDataPicker.cpp:72
const double J2AZMDEG
Conversion from.
Definition: RadarDataPicker.h:182
bool groundCoord
If true, i is looped as a ground coordinate.
Definition: RadarDataPicker.h:173
double current_range
Distance from the radar.
Definition: RadarDataPicker.h:195
double current_sin
Utility.
Definition: RadarDataPicker.h:188
double current_cos
Utility.
Definition: RadarDataPicker.h:190
double current_height
Altitude from the mean sea level.
Definition: RadarDataPicker.h:198
double current_azm
Utility.
Definition: RadarDataPicker.h:192
RadarProj proj
Converts the polar coordinates for a radar to geographical coordinates.
Definition: RadarDataPicker.h:179
PolarDataPicker(drain::ReferenceMap2<> &variableMap, const PolarODIM &odim)
Reads a value, and scales it unless nodata or undetect.
Definition: RadarDataPicker.cpp:41
Metadata structure for single-radar data (polar scans, volumes and products).
Definition: PolarODIM.h:45
Base class for utilities traversing radar data with Sampler.
Definition: RadarDataPicker.h:58
void toOStr(std::ostream &ostr=std::cout) const
Prints images geometry, buffer size and type information.
Definition: RadarDataPicker.h:105
DataSet< src_t > dataset_t
Input dataSet type.
Definition: RadarDataPicker.h:81
SrcType< OD const > src_t
Input source type.
Definition: RadarDataPicker.h:75
bool getValue(const data_t &data, double &value) const
Reads a value, and scales it unless nodata or undetect.
Definition: RadarDataPicker.h:90
RadarDataPicker(drain::ReferenceMap2<> &variableMap, const OD &odim)
Default constructor.
Definition: RadarDataPicker.h:63
double lat
Latitudinal coordinate (degrees)
Definition: RadarDataPicker.h:123
PlainData< src_t > data_t
Input data type.
Definition: RadarDataPicker.h:78
double lon
Longitudinal coordinate (degrees)
Definition: RadarDataPicker.h:121
std::map< std::string, const data_t & > map_t
Map type compatible with Sampler.
Definition: RadarDataPicker.h:84
double y
Metric coordinate corresponding to latitudinal coordinate.
Definition: RadarDataPicker.h:118
const OD & odim
Metadata for navigating and scaling grid data.
Definition: RadarDataPicker.h:126
double x
Metric coordinate corresponding to longitudinal coordinate.
Definition: RadarDataPicker.h:116
Definition: RadarProj.h:99
Definition: DataSelector.cpp:1277
Definition: DataSelector.cpp:44
Interprets data values for Sampler.
Definition: Sampler.h:61
ReferenceMap2 & variableMap
Definition: Sampler.h:115
int current_i
Optional utility. Called prior to writing the actual data to output stream.
Definition: Sampler.h:99
int current_j
Vertical coordinate.
Definition: Sampler.h:102
Read-only data type.
Definition: Data.h:112