![]() |
RDB 2
|
Database create settings. More...
#include <createSettings.hpp>
Public Types | |
enum | ChunkMode { POINT_COUNT = 1, EDGE_LENGTH = 2 } |
Point chunk mode. More... | |
enum | LodMode { THINOUT = 1, COMBINE = 2 } |
Level of detail mode. More... | |
Public Member Functions | |
~CreateSettings () | |
CreateSettings () | |
Default constructor. More... | |
CreateSettings (riegl::rdb::Context &context) | |
CreateSettings (const CreateSettings &settings) | |
Copy constructor. More... | |
CreateSettings & | operator= (const CreateSettings &settings) |
Assignment operator. More... | |
void | load (const std::string &json) |
Load settings from JSON string. More... | |
std::string | save () const |
Save settings to JSON string. More... | |
Public Attributes | |
riegl::rdb::pointcloud::PointAttribute | primaryAttribute |
Primary point attribute. More... | |
std::uint32_t | chunkMode |
Point chunk mode. More... | |
std::uint32_t | chunkSize |
Point chunk size. More... | |
std::uint32_t | lodMode |
Level of detail mode. More... | |
std::uint32_t | chunkSizeLOD |
Level of detail size. More... | |
std::uint64_t | cacheSize |
Point cache size. More... | |
std::uint8_t | compressionLevel |
Data compression level. More... | |
bool | optimizePointID |
Point ID optimization. More... | |
Friends | |
class | CreateSettingsWrapper |
Database create settings.
This class defines settings for creating a new point cloud database.
Definition at line 65 of file createSettings.hpp.
Point chunk mode.
Points are internally organized in chunks (primary point attribute index tree leaves). The size of a chunk (in the dimension of the primary point attribute) may either be fixed (predefined) or adapted automatically so that the number of points in a chunk does not exceed a certain limit. In both cases, the "size" is defined by parameter CreateSettings::chunkSize and parameter CreateSettings::chunkMode defines the meaning of the value.
Definition at line 91 of file createSettings.hpp.
Level of detail mode.
A tree structure is used to sort and organize the point cloud. To create a coarse representation of the point cloud (level of detail = "LOD"), a number of equally distributed points is extracted from the tree leaf nodes and copied to the parent nodes.
The parameter CreateSettings::chunkSizeLOD defines how many points to extract for LOD whereas the meaning of the value and the LOD creation algorithm are defined by the parameter CreateSettings::lodMode.
Enumerator | |
---|---|
THINOUT | the LOD size defines the number of points to copy as a fraction of the total (original) number of points. So if the original point count is for example 19820526 and the size is set to 20%, then the number of LOD points to add is 3964106 (rounded) and the final total number of points is 23784632 (actual value may differ a little bit). |
COMBINE | the LOD size defines the number of binary subdivisions of the LOD node's volume in each dimension. So if the primary point attribute for example has a length of 2 (2D data) and the LOD size is set to 8, then each LOD node is divided into 2^8 * 2^8 = 2^(8*2) = 2^16 = 65536 sub-volumes. All points of the node's immediate sub-nodes that fall into one of the sub-volumes are merged to a single point and stored in the LOD node. The method to merge the attribute values of a group of points can be defined for each point attribute separately (details see class PointAttribute). |
Definition at line 137 of file createSettings.hpp.
riegl::rdb::pointcloud::CreateSettings::~CreateSettings | ( | ) |
riegl::rdb::pointcloud::CreateSettings::CreateSettings | ( | ) |
Default constructor.
All properties are set to default values.
|
explicit |
riegl::rdb::pointcloud::CreateSettings::CreateSettings | ( | const CreateSettings & | settings | ) |
Copy constructor.
All properties are copied from the given settings object.
void riegl::rdb::pointcloud::CreateSettings::load | ( | const std::string & | json | ) |
Load settings from JSON string.
This function parses the given JSON string and applies all available properties - missing properties are silently ignored (i.e. the value remains unchanged). When parsing the JSON string fails, an exception is thrown.
Example JSON string:
{ "primary_attribute": { "name": "riegl.xyz", "title": "XYZ", "description": "Cartesian point coordinates wrt. application coordinate system (0: X, 1: Y, 2: Z)", "unit_symbol": "m", "length": 3, "resolution": 0.00025, "minimum_value": -535000.0, "maximum_value": 535000.0, "default_value": 0.0, "storage_class": "variable", "compression_options": "shuffle", "scale_factor": 1.0 }, "chunk_mode": "point_count", "chunk_size": 65536, "lod_mode": "thinout", "chunk_size_lod": 20, "cache_size": 524288000, "compression_level": 10, "optimize_point_id": false }
CreateSettings& riegl::rdb::pointcloud::CreateSettings::operator= | ( | const CreateSettings & | settings | ) |
Assignment operator.
All properties are copied from the given settings object.
std::string riegl::rdb::pointcloud::CreateSettings::save | ( | ) | const |
Save settings to JSON string.
|
friend |
Definition at line 299 of file createSettings.hpp.
std::uint64_t riegl::rdb::pointcloud::CreateSettings::cacheSize |
Point cache size.
The database engine may buffer read and write operations in an internal cache. This value defines the cache size in bytes (octets).
Default: 500 MB
Definition at line 196 of file createSettings.hpp.
std::uint32_t riegl::rdb::pointcloud::CreateSettings::chunkMode |
Point chunk mode.
Details see: CreateSettings::ChunkMode
Default: CreateSettings::POINT_COUNT
Definition at line 113 of file createSettings.hpp.
std::uint32_t riegl::rdb::pointcloud::CreateSettings::chunkSize |
Point chunk size.
Details see: CreateSettings::ChunkMode
Default: 65536 points
Definition at line 122 of file createSettings.hpp.
std::uint32_t riegl::rdb::pointcloud::CreateSettings::chunkSizeLOD |
Level of detail size.
Details see: CreateSettings::LodMode
To disable LOD generation, set this parameter to zero (no matter which LOD mode is used).
Default: 20 (i.e. 20% of the original point count).
Definition at line 185 of file createSettings.hpp.
std::uint8_t riegl::rdb::pointcloud::CreateSettings::compressionLevel |
Data compression level.
The database automatically compresses point data before it is stored. The compression level defines the compression quality, i.e. higher values produce smaller files.
Range: 0..100 (i.e. percent) Default: 10%
Definition at line 208 of file createSettings.hpp.
std::uint32_t riegl::rdb::pointcloud::CreateSettings::lodMode |
Level of detail mode.
Details see: CreateSettings::LodMode
Default: CreateSettings::THINOUT
Definition at line 169 of file createSettings.hpp.
bool riegl::rdb::pointcloud::CreateSettings::optimizePointID |
Point ID optimization.
Enable this option to apply optimizations to the point ID attribute (riegl.id) that can result in smaller files.
Default: false
Definition at line 227 of file createSettings.hpp.
riegl::rdb::pointcloud::PointAttribute riegl::rdb::pointcloud::CreateSettings::primaryAttribute |
Primary point attribute.
The primary point attribute defines the attribute that is used to sort and index the points. Usually the 3D point coordinates are used for that. The primary attribute is automatically added to the point cloud (using Pointcloud::attributeAdd()) and cannot be deleted.
Definition at line 78 of file createSettings.hpp.