| RDB 2

Public Types | Public Member Functions | Public Attributes | Friends | List of all members
riegl::rdb::pointcloud::CreateSettings Class Reference

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...
std::string | pointInsertMode
| Point insert mode. More...

## Friends
class | CreateSettingsWrapper

## Detailed Description

Database create settings.

This class defines settings for creating a new point cloud database.

Examples:
  rdb-example-01-create-database.cpp.

Definition at line 67 of file createSettings.hpp.

## Member Enumeration Documentation

## ◆ ChunkMode

enum riegl::rdb::pointcloud::CreateSettings::ChunkMode

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.

Enumerator
POINT_COUNT | the chunk size defines the maximum number of points per chunk (the default mode)
EDGE_LENGTH | the chunk size defines the edge length of a chunk as 2^N times resolution of the primary point attribute

Definition at line 93 of file createSettings.hpp.

## ◆ LodMode

enum riegl::rdb::pointcloud::CreateSettings::LodMode

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 139 of file createSettings.hpp.

## Constructor & Destructor Documentation

## ◆ ~CreateSettings()

riegl::rdb::pointcloud::CreateSettings::~CreateSettings | ( |  | ) |

## ◆ CreateSettings() [1/3]

riegl::rdb::pointcloud::CreateSettings::CreateSettings | ( |  | ) |

Default constructor.

All properties are set to default values.

## ◆ CreateSettings() [2/3]

riegl::rdb::pointcloud::CreateSettings::CreateSettings | ( | riegl::rdb::Context & | context | ) |
| explicit

Deprecated:
  since 2.2.3 - use the context-free constructors instead

## ◆ CreateSettings() [3/3]

riegl::rdb::pointcloud::CreateSettings::CreateSettings | ( | const CreateSettings & | settings | ) |

Copy constructor.

All properties are copied from the given settings object.

## Member Function Documentation

## ◆ load()

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,
        "point_insert_mode": "single-pass"
    }

## ◆ operator=()

CreateSettings& riegl::rdb::pointcloud::CreateSettings::operator= | ( | const CreateSettings & | settings | ) |

Assignment operator.

All properties are copied from the given settings object.

## ◆ save()

std::string riegl::rdb::pointcloud::CreateSettings::save | ( |  | ) | const

Save settings to JSON string.

See also
  load()

## Friends And Related Function Documentation

## ◆ CreateSettingsWrapper

friend class CreateSettingsWrapper
| friend

Definition at line 332 of file createSettings.hpp.

## Member Data Documentation

## ◆ cacheSize

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 198 of file createSettings.hpp.

## ◆ chunkMode

std::uint32_t riegl::rdb::pointcloud::CreateSettings::chunkMode

Point chunk mode.

Details see: CreateSettings::ChunkMode

Default: CreateSettings::POINT_COUNT

Examples:
  rdb-example-01-create-database.cpp.

Definition at line 115 of file createSettings.hpp.

## ◆ chunkSize

std::uint32_t riegl::rdb::pointcloud::CreateSettings::chunkSize

Point chunk size.

Details see: CreateSettings::ChunkMode

Default: 65536 points

Examples:
  rdb-example-01-create-database.cpp.

Definition at line 124 of file createSettings.hpp.

## ◆ chunkSizeLOD

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).

Note
  In RDB library versions before 2.0.850 this parameter had a different meaning. To retain compatibility, the parameter was not renamed to e.g. 'overheadLOD' - hence the strange name.

Definition at line 187 of file createSettings.hpp.

## ◆ compressionLevel

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%

Examples:
  rdb-example-01-create-database.cpp.

Definition at line 210 of file createSettings.hpp.

## ◆ lodMode

std::uint32_t riegl::rdb::pointcloud::CreateSettings::lodMode

Level of detail mode.

Details see: CreateSettings::LodMode

Default: CreateSettings::THINOUT

Definition at line 171 of file createSettings.hpp.

## ◆ optimizePointID

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

Note
  No optimizations are applied when:
  - points were inserted in a previous transaction
  - buffers for the point ID (riegl.id) or dynamic point attributes (e.g. "riegl.selected", "riegl.visible") are passed to the insert query (QueryInsert class)

Warning
  When optimizations are enabled, the point ID no longer reflects the order in which the points were inserted.

Definition at line 229 of file createSettings.hpp.

## ◆ pointInsertMode

std::string riegl::rdb::pointcloud::CreateSettings::pointInsertMode

Point insert mode.

This setting specifies how points are to be inserted into the database.

Supported values:

- "single-pass" (default) Points are sorted and inserted into the internal index structure each time QueryInsert::next() is called. This is suitable for scenarios where the same objects are only scanned once or just a few times (e.g in TLS or MLS).
- "multi-pass" Points are sorted and inserted into the internal index structure after the last call to QueryInsert::next() when the transaction is committed. This is suitable for scenarios where the same objects are scanned multiple times (e.g. in ALS or ULS when the system passes over the same area several times without toggling data acquisition). This mode is only supported for 3D point clouds (e.g. when the primary point attribute is "riegl.xyz") and when no points have been inserted before. Otherwise "single-pass" mode is used instead. This mode implies "optimizePointID" and point IDs are not returned by the insert query.

Note
  It is recommended to only check whether the string starts with one of the above values and to ignore all subsequent characters (mode-specific parameters may be added after the mode name in the future).

Definition at line 259 of file createSettings.hpp.

## ◆ primaryAttribute

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.

See also
  riegl::rdb::pointcloud::PointAttributes

Examples:
  rdb-example-01-create-database.cpp.

Definition at line 80 of file createSettings.hpp.

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

- riegl/rdb/pointcloud/createSettings.hpp