![]() |
RDB 2
|
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... | |
Basic point cloud management interface.
Definition at line 64 of file management.hpp.
|
explicit |
Constructor.
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().
std::uint32_t riegl::rdb::pointcloud::Management::getChunkSizeLOD | ( | ) | const |
Query level of detail size.
std::uint32_t riegl::rdb::pointcloud::Management::getLodMode | ( | ) | const |
Query level of detail mode.
void riegl::rdb::pointcloud::Management::setChunkSizeLOD | ( | const std::uint32_t | value | ) |
Modify level of detail size.
void riegl::rdb::pointcloud::Management::setLodMode | ( | const std::uint32_t | value | ) |
Modify level of detail mode.
|
inline |
Optimize database file.
Overloaded vacuum() that takes any callable type as progress callback.
Definition at line 133 of file management.hpp.
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().
[in] | progress | vacuum progress callback function |
[in] | userdata | progress callback function user data |
|
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.
|
inline |
Optimize database file.
Overloaded vacuum() that takes a progress callback method of an object.
Definition at line 148 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?" ] }
[in] | schema | database schema (JSON) |
[in] | strict | true: strict mode |