33 #ifndef RACK_CART_CREATE
34 #define RACK_CART_CREATE
38 #include <drain/prog/CommandInstaller.h>
39 #include "resources.h"
41 #include "composite.h"
71 mout.
attention<LOG_DEBUG>(
"composite*: ", &composite,
" accArray: ", composite.
accArray);
82 if (composite.
odim.ACCnum > 0){
85 mout.
hint<LOG_DEBUG>(
"Clearing previous composite. If that was not meant, use --cAdd to add, instead.");
93 add(composite, RackContext::POLAR|RackContext::CURRENT,
true);
103 mout.
note(
"Quality [", composite.
odim.
quantity,
"] as input: extracting data only");
144 mout.
error(
"Composite geometry undefined, cannot create tile");
147 mout.
error(
"Bounding box undefined, cannot create tile");
150 mout.
error(
"Projection undefined, cannot create tile");
153 mout.
debug(
"Clearing previous composite...");
157 composite.
odim.ACCnum = 0;
158 composite.
odim.scaling.set(0,0);
160 mout.info(
"Cleared previous composite");
166 add(composite, RackContext::POLAR|RackContext::CURRENT,
true);
170 if (!composite.isCropping()){
171 mout.
warn(
"Composite cropping switched off during op");
172 mout.
error(
"? Programming error in parallel comp design");
193 getParameters().link(
"range", PolarODIM::defaultRange,
"km");
198 getParameters().link(
"range", PolarODIM::defaultRange,
"km");
227 mout.
debug(
"composite*: ", &composite,
"accArray: ", composite.
accArray);
230 mout.
warn(
"polar input not empty");
271 ctx.unsetCurrentImages();
Simple implementation of Command: adds name , description and parameters .
Definition: Command.h:417
StatusFlags statusFlags
Optional log filename (syntax): when defined, automatically opened by CommandBank::run()
Definition: Context.h:98
LogSourc e is the means for a function or any program segment to "connect" to a Log.
Definition: Log.h:308
Logger & error(const TT &... args)
Echoes.
Definition: Log.h:412
Logger & attention(const TT &... args)
Possible error, but execution can continue. Special type of Logger::warn().
Definition: Log.h:472
Logger & note(const TT &... args)
For top-level information.
Definition: Log.h:485
Logger & warn(const TT &... args)
Possible error, but execution can continue.
Definition: Log.h:426
Logger & debug(const TT &... args)
Public, yet typically used "internally", when TIMING=true.
Definition: Log.h:676
Logger & hint(const TT &... args)
Like advice, but weaker.
Definition: Log.h:630
General-purpose key matcher: tests string equality, or regExp, if defined as such.
Definition: StringMatcher.h:58
bool test(const std::string &s) const
Test with direct string matching or regExp, if defined.
Definition: StringMatcher.cpp:70
void clear()
Resets the accumulation array values to undetectValue. Does not change the geometry.
Definition: AccumulationArray.cpp:63
void reset()
Collapses the accumulation geometries to zero area.
Definition: AccumulationArray.h:151
AccumulationArray accArray
Todo: export.
Definition: Accumulator.h:80
bool bboxIsSet() const
Returns true, if the bounding box (geographical extent) has been set.
Definition: GeoFrame.h:99
bool geometryIsSet() const
Return true, if array area is greater than zero.
Definition: GeoFrame.h:89
bool projectionIsSet() const
Returns true, if the geographical extent has been set.
Definition: GeoFrame.h:83
Creates a single-radar Cartesian data set (2D data of both quantity and quality).
Definition: cartesian-create.h:210
void exec() const
Run the command with current parameter values.
Definition: cartesian-create.h:220
Creates a single-radar Cartesian data set (2D data of both quantity and quality).
Definition: cartesian-create.h:54
void exec() const
Run the command with current parameter values.
Definition: cartesian-create.h:64
Definition: cartesian-create.h:187
Creates a single-radar Cartesian data set (2D data of both quantity and quality).
Definition: cartesian-create.h:246
void exec() const
Run the command with current parameter values.
Definition: cartesian-create.h:254
Definition: cartesian-create.h:126
void exec() const
Run the command with current parameter values.
Definition: cartesian-create.h:135
Cartesian composite (mosaic) of data from several radars.
Definition: Composite.h:105
void setCropping(bool cropping=true)
If cropping is set, calling addPolar() also crops the bounding box to intersection of radar area and ...
Definition: Composite.h:145
void createBinIndex(Hi5Tree &dst)
Definition: Composite.cpp:440
drain::VariableMap nodeMap
Node keys (like "fivan") associated with upper left corner pixel coordinates [int] of the "tile".
Definition: Composite.h:189
drain::VariableMap metadataMap
EXPERIMENTAL: save elangles TODO: consider rename metadataMap (for hairy details)
Definition: Composite.h:192
Definition: composite.h:58
void add(Composite &composite, drain::Flags::ivalue_t inputFilter, bool updateSelector=true) const
Definition: composite.cpp:112
void extract(Composite &composite, const std::string &channels, const std::string &crop="") const
Definition: composite.cpp:667
void setQuantities(const std::string &s)
Sets basic quantities and quality quantities. These sets are separated by '/'.
Definition: DataSelector.cpp:282
void reset()
Restore default values.
Definition: DataSelector.cpp:156
std::string type
This is non-standard (not in ODIM), but a practical means of handling storage type of datasets.
Definition: EncodingODIM.h:146
void clear()
Resets the values.
Definition: EncodingODIM.cpp:171
Hi5Tree polarInputHi5
The last input file read, typically a volume. May be concatenated ie. read in incrementally.
Definition: resources-base.h:187
std::string quantity
dataX/what (obligatory)
Definition: ODIM.h:181
Resources provided separately for each thread.
Definition: resources.h:67
Composite composite
TODO: inherit from ProductBase.
Definition: resources.h:119
Composite & getComposite(h5_role::ivalue_t filter)
Definition: resources.cpp:139
OD odim
For storing the scaling and encoding of (1st) input or user-defined values. Also for bookkeeping of d...
Definition: RadarAccumulator.h:111
DataSelector dataSelector
Input data selector.
Definition: RadarAccumulator.h:102
void setTargetEncoding(const std::string &encoding)
Not critical. If set, needed to warn if input data does not match the expected / potential targetEnco...
Definition: RadarAccumulator.h:125
Definition: DataSelector.cpp:44