RDB 2: riegl::rdb::pointcloud::Management 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::Management Class Reference

Basic point cloud management interface. More...

`#include <management.hpp>`

## Public Member Functions
| Management (riegl::rdb::PointcloudData *pointcloud)
| Constructor. More...
std::uint32_t | getLodMode () const
| Query level of detail mode. More...
void | setLodMode (const std::uint32_t value)
| Modify level of detail mode. More...
std::uint32_t | getChunkSizeLOD () const
| Query level of detail size. More...
void | setChunkSizeLOD (const std::uint32_t value)
| Modify level of detail size. More...
void | finalize ()
| Dismiss database history. More...
void | vacuum (Progress progress=nullptr, void *userdata=nullptr)
| Optimize database file. More...
template<typename Callable >
void | vacuum (Callable &&progress)
| Optimize database file. More...
template<typename Receiver >
void | vacuum (void(Receiver::*progress)(std::uint8_t), Receiver &receiver)
| Optimize database file. More...
template<typename Receiver >
void | vacuum (void(Receiver::*progress)(std::uint8_t) const, const Receiver &receiver)
| Optimize database file. More...
void | validate (const std::string &schema, const bool strict=false) const
| Validate database file. More...

## Detailed Description

Basic point cloud management interface.

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

Definition at line 64 of file management.hpp.

## Constructor & Destructor Documentation

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

Constructor.

Note
  You cannot create new Management objects directly, use riegl::rdb::Pointcloud::management() instead.

## Member Function Documentation

void riegl::rdb::pointcloud::Management::finalize | ( |  | ) |

Dismiss database history.

This function deletes all transactions except the first (database creation) and the current transaction (last committed or restored). Please note that this operation only removes the transactions from the database history and releases the related data blocks in the database file so that they can be re-used by subsequent transactions. However the database file size will not decrease unless you call vacuum().

Examples:
  rdb-example-09-cleanup-database.cpp.

std::uint32_t riegl::rdb::pointcloud::Management::getChunkSizeLOD | ( |  | ) | const

Query level of detail size.

See Also
  riegl::rdb::pointcloud::CreateSettings::LodMode

std::uint32_t riegl::rdb::pointcloud::Management::getLodMode | ( |  | ) | const

Query level of detail mode.

See Also
  riegl::rdb::pointcloud::CreateSettings::LodMode

void riegl::rdb::pointcloud::Management::setChunkSizeLOD | ( | const std::uint32_t | value | ) |

Modify level of detail size.

See Also
  riegl::rdb::pointcloud::CreateSettings::LodMode

void riegl::rdb::pointcloud::Management::setLodMode | ( | const std::uint32_t | value | ) |

Modify level of detail mode.

See Also
  riegl::rdb::pointcloud::CreateSettings::LodMode

void riegl::rdb::pointcloud::Management::vacuum | ( | Progress | progress = `nullptr`,
|  | void * | userdata = `nullptr`
| ) |  |

Optimize database file.

This function reorganizes the data blocks in the database file so that there are no (or as few as possible) unused blocks (gaps). This is especially helpful after deleting point attributes or calling finalize().

Note
  This might be a lengthy operation and no other client can access the database in the meantime, not even to read.

Parameters

  [in] | progress | vacuum progress callback function
  [in] | userdata | progress callback function user data

Examples:
  rdb-example-09-cleanup-database.cpp.

template<typename Callable >

void riegl::rdb::pointcloud::Management::vacuum | ( | Callable && | progress | ) |
| inline

Optimize database file.

Overloaded vacuum() that takes any callable type as progress callback.

Definition at line 133 of file management.hpp.

template<typename Receiver >

void riegl::rdb::pointcloud::Management::vacuum | ( | void(Receiver::*)(std::uint8_t) | progress,
|  | Receiver & | receiver
| ) |  |
| inline

Optimize database file.

Overloaded vacuum() that takes a progress callback method of an object.

Definition at line 148 of file management.hpp.

template<typename Receiver >

void riegl::rdb::pointcloud::Management::vacuum | ( | void(Receiver::*)(std::uint8_t) const | progress,
|  | const Receiver & | receiver
| ) |  |
| inline

Optimize database file.

Overloaded vacuum() that takes a constant progress callback method of a constant object.

Definition at line 161 of file management.hpp.

void riegl::rdb::pointcloud::Management::validate | ( | const std::string & | schema,
|  | const bool | strict = `false`
| ) |  | const

Validate database file.

This function checks whether the database corresponds to the given schema. The schema contains a list of required and optional point attributes and metadata entries and is given in JSON format. Primary point attributes are marked with a "*", optional attributes or metadata entries are marked with a "?" appended to the name, all other items are required.

The database must at least contain all primary and required point attributes and all required metadata entries to correspond to the schema. If "strict" is "true", then the database additionally is not allowed to contain extra point attributes or metadata entries that are not listed in the schema.

If the database does not correspond to the schema, an exception is thrown and the reason can be found in the exception details.

Example schema JSON string:

    {
        "extension": "rdbx",
        "attributes": [
            "riegl.xyz*",
            "riegl.timestamp",
            "riegl.class?"
        ],
        "metadata": [
            "riegl.geo_tag",
            "riegl.device?"
        ]

Parameters

  [in] | schema | database schema (JSON)
  [in] | strict | true: strict mode

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

- riegl/rdb/pointcloud/management.hpp