RDB 2: riegl::rdb::pointcloud::QueryStat Class Reference

| RDB 2

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
riegl::rdb::pointcloud::QueryStat Class Reference

Point statistics query. More...

`#include <queryStat.hpp>`

## Public Member Functions
| QueryStat ()
| Default constructor. More...
| QueryStat (riegl::rdb::PointcloudData *pointcloud)
| Constructor. More...
| operator bool () const
| Check if query is not null. More...
bool | valid () const
| Check if query is not null. More...
void | close ()
| Finish query. More...
void | index (GraphNode &root, const std::string &filter=std::string())
| Get index graph. More...
GraphNode | index (const std::string &filter=std::string())
void | minimum (const GraphNode::ID &nodeID, const std::string &attribute, const DataType dataType, void *buffer, const bool cleaned=false)
| Lowest value of node. More...
template<typename ValueType >
void | minimum (const GraphNode::ID &nodeID, const std::string &attribute, ValueType &buffer, const bool cleaned=false)
| Lowest value of node. More...
template<typename ValueType >
void | minimum (const GraphNode::ID &nodeID, const std::string &attribute, ValueType *buffer, const bool cleaned=false)
| Lowest value of node. More...
void | maximum (const GraphNode::ID &nodeID, const std::string &attribute, const DataType dataType, void *buffer, const bool cleaned=false)
| Highest value of node. More...
template<typename ValueType >
void | maximum (const GraphNode::ID &nodeID, const std::string &attribute, ValueType &buffer, const bool cleaned=false)
| Highest value of node. More...
template<typename ValueType >
void | maximum (const GraphNode::ID &nodeID, const std::string &attribute, ValueType *buffer, const bool cleaned=false)
| Highest value of node. More...
void | revision (const GraphNode::ID &nodeID, const std::string &attribute, Transaction::ID &revision)
| Attribute revision. More...
Transaction::ID | revision (const GraphNode::ID &nodeID, const std::string &attribute)

## Detailed Description

Point statistics query.

This query provides point attribute statistics like minimum and maximum value.

See Also
  riegl::rdb::Pointcloud::stat()

Note
  You either must delete the query object or call close() before the parent Pointcloud instance is closed/deleted!

Examples:
  rdb-example-06-database-stat.cpp.

Definition at line 69 of file queryStat.hpp.

## Constructor & Destructor Documentation

riegl::rdb::pointcloud::QueryStat::QueryStat | ( |  | ) |
| explicit

Default constructor.

Creates a null query - i.e. the query cannot be used to read stats.

See Also
  riegl::rdb::Pointcloud::stat()

riegl::rdb::pointcloud::QueryStat::QueryStat | ( | riegl::rdb::PointcloudData * | pointcloud | ) |
| explicit

Constructor.

Creates a query prepared for reading stats.

Note
  You cannot create new QueryStat objects this way, use riegl::rdb::Pointcloud::stat() instead.

## Member Function Documentation

void riegl::rdb::pointcloud::QueryStat::close | ( |  | ) |

Finish query.

Call this function when done with reading stats.

void riegl::rdb::pointcloud::QueryStat::index | ( | GraphNode & | root,
|  | const std::string & | filter = `std::string()`
| ) |  |

Get index graph.

This function returns a simple directed graph which represents the index structure that is used to organize the point cloud.

The optional filter expression can be used to select particular graph nodes - if no filter is given, all nodes will be returned. Filter expression syntax see riegl::rdb::Pointcloud::select().

Note: The reported point counts and attribute extents are not affected by the filter expressions given here or defined in the meta data item riegl.stored_filters.

Details see description of class GraphNode.

Parameters

  [out] | root | graph root node
  [in] | filter | optional filter expression

Examples:
  rdb-example-06-database-stat.cpp.

GraphNode riegl::rdb::pointcloud::QueryStat::index | ( | const std::string & | filter = `std::string()` | ) |
| inline

Parameters

  [in] | filter | optional filter expression

Definition at line 132 of file queryStat.hpp.

void riegl::rdb::pointcloud::QueryStat::maximum | ( | const GraphNode::ID & | nodeID,
|  | const std::string & | attribute,
|  | const DataType | dataType,
|  | void * | buffer,
|  | const bool | cleaned = `false`
| ) |  |

Highest value of node.

Provides the attribute's maximum value of a branch (i.e. node and children). If the node ID is zero, then the maximum value of all points is returned.

The target buffer is expected to be s*d bytes large, where s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Parameters

  [in] | nodeID | node identifier
  [in] | attribute | attribute name
  [in] | dataType | data type of target buffer
  [out] | buffer | buffer for maximum value
  [in] | cleaned | true: ignore invalid values

Examples:
  rdb-example-06-database-stat.cpp.

template<typename ValueType >

void riegl::rdb::pointcloud::QueryStat::maximum | ( | const GraphNode::ID & | nodeID,
|  | const std::string & | attribute,
|  | ValueType & | buffer,
|  | const bool | cleaned = `false`
| ) |  |
| inline

Highest value of node.

Provides the attribute's maximum value of a branch (i.e. node and children). If the node ID is zero, then the maximum value of all points is returned.

The target buffer is expected to be s*d bytes large, where s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Parameters

  [in] | nodeID | node identifier
  [in] | attribute | attribute name
  [out] | buffer | buffer (data, pointer to data, std::array or std::vector)
  [in] | cleaned | true: ignore invalid values

Definition at line 203 of file queryStat.hpp.

template<typename ValueType >

void riegl::rdb::pointcloud::QueryStat::maximum | ( | const GraphNode::ID & | nodeID,
|  | const std::string & | attribute,
|  | ValueType * | buffer,
|  | const bool | cleaned = `false`
| ) |  |
| inline

Highest value of node.

Provides the attribute's maximum value of a branch (i.e. node and children). If the node ID is zero, then the maximum value of all points is returned.

The target buffer is expected to be s*d bytes large, where s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Parameters

  [in] | nodeID | node identifier
  [in] | attribute | attribute name
  [out] | buffer | buffer (data, pointer to data, std::array or std::vector)
  [in] | cleaned | true: ignore invalid values

Definition at line 215 of file queryStat.hpp.

void riegl::rdb::pointcloud::QueryStat::minimum | ( | const GraphNode::ID & | nodeID,
|  | const std::string & | attribute,
|  | const DataType | dataType,
|  | void * | buffer,
|  | const bool | cleaned = `false`
| ) |  |

Lowest value of node.

Provides the attribute's minimum value of a branch (i.e. node and children). If the node ID is zero, then the minimum value of all points is returned.

The target buffer is expected to be s*d bytes large, where s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Parameters

  [in] | nodeID | node identifier
  [in] | attribute | attribute name
  [in] | dataType | data type of target buffer
  [out] | buffer | buffer for minimum value
  [in] | cleaned | true: ignore invalid values

Examples:
  rdb-example-06-database-stat.cpp.

template<typename ValueType >

void riegl::rdb::pointcloud::QueryStat::minimum | ( | const GraphNode::ID & | nodeID,
|  | const std::string & | attribute,
|  | ValueType & | buffer,
|  | const bool | cleaned = `false`
| ) |  |
| inline

Lowest value of node.

Provides the attribute's minimum value of a branch (i.e. node and children). If the node ID is zero, then the minimum value of all points is returned.

The target buffer is expected to be s*d bytes large, where s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Parameters

  [in] | nodeID | node identifier
  [in] | attribute | attribute name
  [out] | buffer | buffer (data, pointer to data, std::array or std::vector)
  [in] | cleaned | true: ignore invalid values

Definition at line 161 of file queryStat.hpp.

template<typename ValueType >

void riegl::rdb::pointcloud::QueryStat::minimum | ( | const GraphNode::ID & | nodeID,
|  | const std::string & | attribute,
|  | ValueType * | buffer,
|  | const bool | cleaned = `false`
| ) |  |
| inline

Lowest value of node.

Provides the attribute's minimum value of a branch (i.e. node and children). If the node ID is zero, then the minimum value of all points is returned.

The target buffer is expected to be s*d bytes large, where s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Parameters

  [in] | nodeID | node identifier
  [in] | attribute | attribute name
  [out] | buffer | buffer (data, pointer to data, std::array or std::vector)
  [in] | cleaned | true: ignore invalid values

Definition at line 173 of file queryStat.hpp.

riegl::rdb::pointcloud::QueryStat::operator bool | ( |  | ) | const

Check if query is not null.

See Also
  valid()

void riegl::rdb::pointcloud::QueryStat::revision | ( | const GraphNode::ID & | nodeID,
|  | const std::string & | attribute,
|  | Transaction::ID & | revision
| ) |  |

Attribute revision.

Provides the ID of the last transaction that has modified the attribute in any node of the given branch.

Parameters

  [in] | nodeID | node identifier
  [in] | attribute | attribute name
  [out] | revision | transaction ID, see above

Transaction::ID riegl::rdb::pointcloud::QueryStat::revision | ( | const GraphNode::ID & | nodeID,
|  | const std::string & | attribute
| ) |  |
| inline

Parameters

  [in] | nodeID | node identifier
  [in] | attribute | attribute name

Definition at line 236 of file queryStat.hpp.

bool riegl::rdb::pointcloud::QueryStat::valid | ( |  | ) | const

Check if query is not null.

A null query cannot be used to read stats.

The documentation for this class was generated from the following file:

- riegl/rdb/pointcloud/queryStat.hpp