|
Tool for selecting datasets based on paths, quantities and min/max elevations. More...
#include <DataTools.h>
Public Types | |
typedef std::map< std::string, ODIMPathElem > | quantity_map |
Static Public Member Functions | |
template<class M > | |
static void | getAttributes (const Hi5Tree &src, const Hi5Tree::path_t &path, M &attributes, bool updateOnly=false) |
Traverses upward in hierachy to find the value of the given PolarODIM where, what, or how attribute. More... | |
static void | getQuantityMap (const Hi5Tree &srcDataset, ODIMPathElemMap &m) |
static void | updateInternalAttributes (Hi5Tree &src) |
Copies values of what , where and how attributes to internal attributes down to data [n] groups. More... | |
static void | updateInternalAttributes (const Hi5Tree &src) |
This const version does nothing, but is needed for Data:: #supdateTree3() More... | |
static void | updateCoordinatePolicy (Hi5Tree &src, const drain::image::CoordinatePolicy &policy=drain::image::CoordinatePolicy(drain::image::EdgePolicy::LIMIT)) |
static void | markExcluded (Hi5Tree &src, bool exclude=true) |
Mark/unmark whole tree to be deleted with #Hi5Base::deleteExcluded() More... | |
static void | markExcluded (Hi5Tree &src, const Hi5Tree::path_t &path, bool exclude=true) |
(Un)mark groups along a path for deletion by #Hi5Base::deleteExcluded() | |
static bool | treeToStream (const Hi5Tree::node_data_t &data, std::ostream &ostr) |
Tree attribute formatter. More... | |
static std::list< std::string > & | getMainAttributes () |
static drain::VariableMap & | getAttributeStyles () |
List of most important ODIM attributes (with style suggestion). | |
Static Protected Member Functions | |
static bool | removeIfExcluded (const Hi5Tree &src) |
Removes the children of the tree if Node::exclude is set. More... | |
static void | updateInternalAttributes (Hi5Tree &src, const drain::FlexVariableMap &attributes) |
Copies values of what , where and how attributes to internal attributes down to data [n] groups. More... | |
Tool for selecting datasets based on paths, quantities and min/max elevations.
Applies drain::RegExp in matching.
|
static |
Traverses upward in hierachy to find the value of the given PolarODIM where, what, or how attribute.
src | - structure to be searched |
path | - starting path, to be continued upwards |
group | - "what", "where", or "how" |
attributeName | - name of the attribute Collects PolarODIM /where, /what and /how attributes recursively along the path and stores them in a std::map<std::string,T> (e.g. VariableMap or ReferenceMap, ODIM). Does not change attributes of src. \see updateAttributes()template <class M> static void getAttributesOLD(const Hi5Tree &src, const std::string & path, M & attributes, bool updateOnly = false); |
|
static |
Mark/unmark whole tree to be deleted with #Hi5Base::deleteExcluded()
This function traverses all the children and their children, recursively. Needed here, ATTRIBUTE_GROUPS not in Hi5Base.
|
inlinestaticprotected |
Removes the children of the tree if Node::exclude is set.
\return - true if children were removed
static bool removeIfExcluded_REMOVE(Hi5Tree & dst); Does nothing
|
static |
Tree attribute formatter.
Applied by drain::TreeUtils::dump(). Example:
|
inlinestatic |
This const
version does nothing, but is needed for Data:: #supdateTree3()
|
static |
Copies values of what
, where
and how
attributes to internal attributes down to data
[n] groups.
Traverses the data tree, updates the data (image) attributes along the path down to data
[n] level; the lowest groups containing data arrays, that is data
groups, are not updated.
Note that also the \i coordinate \i policy is updated, because the corresponding variable is linked by ImageFrame::init().
Typically, this is called on the root.
|
staticprotected |
Copies values of what
, where
and how
attributes to internal attributes down to data
[n] groups.
Traverses the data tree, updates the data (image) attributes along the path down to data
[n] level; the lowest groups containing data arrays, that is data
groups, are not updated.
Note that also the \i coordinate \i policy is updated, because the corresponding variable is linked by ImageFrame::init().
Typically, this is called on the root.
Write to "hidden" variables of this node (src).
Step 1: collect local values of /what
, /where
, and /how
groups, overwriting attributes initialised to parent values.