RDB 2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Friends | List of all members
riegl::rdb::Pointcloud Class Reference

Main point cloud database class. More...

#include <pointcloud.hpp>

Public Member Functions

Constructors and destructor
 Pointcloud (Context context=Context())
 Create Pointcloud instance. More...
 
 ~Pointcloud ()
 Destroy Pointcloud instance. More...
 
Database Access
void create (const std::string &location, const pointcloud::CreateSettings &settings)
 Create new database. More...
 
void create (const std::string &location, const pointcloud::CreateSettings &settings, const std::string &schema, const bool optionals=false)
 Create new database. More...
 
void open (const std::string &location, const pointcloud::OpenSettings &settings)
 Open existing database. More...
 
void close ()
 Close database. More...
 
bool isOpen () const
 Check if a database is open. More...
 
bool isEmpty () const
 Check if a database is empty. More...
 
std::string getUUID () const
 Get database file's UUID. More...
 
std::string inspect (const std::uint8_t format)
 File statistics and debugging information. More...
 
void clearCache ()
 Clear internal data cache. More...
 
Database Management
pointcloud::Managementmanagement ()
 Basic point cloud management interface. More...
 
const pointcloud::Managementmanagement () const
 Basic point cloud management interface. More...
 
pointcloud::Changelogchangelog ()
 Manage point cloud changelog. More...
 
const pointcloud::Changelogchangelog () const
 Manage point cloud changelog. More...
 
pointcloud::MetaDatametaData ()
 Manage point cloud meta data. More...
 
const pointcloud::MetaDatametaData () const
 Manage point cloud meta data. More...
 
pointcloud::PointAttributespointAttribute ()
 Manage point attributes. More...
 
const pointcloud::PointAttributespointAttribute () const
 Manage point attributes. More...
 
pointcloud::Transactionstransaction ()
 Manage point cloud transactions. More...
 
const pointcloud::Transactionstransaction () const
 Manage point cloud transactions. More...
 
Point Queries
pointcloud::QueryInsert insert ()
 Insert points. More...
 
pointcloud::QueryUpdate update ()
 Update points. More...
 
pointcloud::QuerySelect select (const std::string &filter=std::string())
 Select points. More...
 
pointcloud::QuerySelect select (const pointcloud::GraphNode::ID &node, const std::string &filter=std::string())
 Select points by index node. More...
 
pointcloud::QuerySelect select (const std::vector< pointcloud::GraphNode::ID > &nodes, const std::string &filter=std::string())
 Select points by index nodes. More...
 
pointcloud::QueryFill fill (const std::string &filter=std::string())
 Fill points. More...
 
pointcloud::QueryFill fill (const pointcloud::GraphNode::ID &node, const std::string &filter=std::string())
 Fill points by index node. More...
 
pointcloud::QueryFill fill (const std::vector< pointcloud::GraphNode::ID > &nodes, const std::string &filter=std::string())
 Fill points by index nodes. More...
 
pointcloud::QueryInvert invert (const std::string &filter=std::string())
 Invert points. More...
 
pointcloud::QueryInvert invert (const pointcloud::GraphNode::ID &node, const std::string &filter=std::string())
 Invert points by index node. More...
 
pointcloud::QueryInvert invert (const std::vector< pointcloud::GraphNode::ID > &nodes, const std::string &filter=std::string())
 Invert points by index nodes. More...
 
pointcloud::QueryRemove remove ()
 Remove points. More...
 
pointcloud::QueryStat stat ()
 Query point statistics. More...
 

Friends

class riegl::rdb::pointcloud::PointAttributes
 

Detailed Description

Main point cloud database class.

Use this class to create or open a point cloud database and insert, update or query points.

Note
All functions of this class throw an Exception of class riegl::rdb::Error in case of troubles.
Examples:
rdb-example-01-create-database.cpp, rdb-example-02-insert-points.cpp, rdb-example-03-select-points.cpp, rdb-example-04-update-points.cpp, rdb-example-05-remove-points.cpp, rdb-example-06-database-stat.cpp, rdb-example-07-fill-points.cpp, rdb-example-08-invert-points.cpp, rdb-example-09-cleanup-database.cpp, and rdb-example-10-attribute-groups.cpp.

Definition at line 89 of file pointcloud.hpp.

Constructor & Destructor Documentation

riegl::rdb::Pointcloud::Pointcloud ( Context  context = Context())
explicit

Create Pointcloud instance.

This creates a new Pointcloud object instance. To actually access or create a point cloud database file, you must call open() or create().

Each Pointcloud instance may only be accessed from one thread/process at a time. Opening the same database using different Pointcloud instances (in the same or different thread or process) is allowed.

Note
The implicit copy-constructor and assignment-operators will yield to multiple instances pointing to the same database file. This is okay, as long as you do not intend to use both instances in different threads simultaneously.
See Also
Pointcloud::create()
Pointcloud::open()
riegl::rdb::Pointcloud::~Pointcloud ( )

Destroy Pointcloud instance.

Note
If there are multiple Pointcloud instances pointing to the same file (see constructor notes), then the database file will be closed when the last Pointcloud instance is deleted.

Member Function Documentation

pointcloud::Changelog& riegl::rdb::Pointcloud::changelog ( )

Manage point cloud changelog.

See Also
riegl::rdb::pointcloud::Changelog
const pointcloud::Changelog& riegl::rdb::Pointcloud::changelog ( ) const

Manage point cloud changelog.

See Also
riegl::rdb::pointcloud::Changelog
void riegl::rdb::Pointcloud::clearCache ( )

Clear internal data cache.

This function clears (flushes) the internal data cache and reduces memory consumption as much as possible.

void riegl::rdb::Pointcloud::close ( )

Close database.

Close database file and release all internal resources. This function fails if there are pending transactions.

Note
Keep in mind to close all queries before you close or delete the database instance!
void riegl::rdb::Pointcloud::create ( const std::string &  location,
const pointcloud::CreateSettings settings 
)

Create new database.

This function creates a new (empty) database. If the given database already exists, it will be overwritten (unless it is opened by other clients, in which case the creation will fail). The target folder must exist - it is not created automatically. If the database could not be created, an exception is thrown.

Parameters
[in]locationdatabase location (filename)
[in]settingsdatabase creation settings
Examples:
rdb-example-01-create-database.cpp.
void riegl::rdb::Pointcloud::create ( const std::string &  location,
const pointcloud::CreateSettings settings,
const std::string &  schema,
const bool  optionals = false 
)

Create new database.

Create new database. This function creates a new (empty) database. If the given database already exists, it will be overwritten (unless it is opened by other clients, in which case the creation will fail). The target folder must exist - it is not created automatically. If the database could not be created, an exception is thrown.

Additionally, all required point attributes and metadata entries as defined by the schema are added to the database. The schema is given in JSON format, details see riegl::rdb::pointcloud::Management::validate(). If 'optionals' is 'true', then also the optional point attributes and metadata entries are added to the database.

Note
Only RIEGL default point attributes and metadata entries are supported. Metadata entries are added but have no value (empty string).
If the schema defines a primary point attribute, then it overrides the primary point attribute defined in the 'settings' parameter.
See Also
riegl::rdb::pointcloud::Management::validate()
Parameters
[in]locationdatabase location (filename)
[in]settingsdatabase creation settings
[in]schemadatabase schema (JSON format)
[in]optionalstrue: include optional items
pointcloud::QueryFill riegl::rdb::Pointcloud::fill ( const std::string &  filter = std::string())

Fill points.

This function creates a new query object that can be used to set (modify) attributes of existing points.

Please have a look at select() for details about the filter expression.

See Also
riegl::rdb::pointcloud::QueryFill
Parameters
[in]filteroptional point filter expression
Examples:
rdb-example-07-fill-points.cpp.
pointcloud::QueryFill riegl::rdb::Pointcloud::fill ( const pointcloud::GraphNode::ID node,
const std::string &  filter = std::string() 
)

Fill points by index node.

This function creates a new query object that can be used to set (modify) attributes of existing points.

Please have a look at select() for details about the filter expression.

See Also
riegl::rdb::pointcloud::QueryFill

Instead of modifying all points of the point cloud this variant just modifies the points contained in a single node. See notes about LOD for details.

Parameters
[in]nodeID of index graph node
[in]filteroptional point filter expression
pointcloud::QueryFill riegl::rdb::Pointcloud::fill ( const std::vector< pointcloud::GraphNode::ID > &  nodes,
const std::string &  filter = std::string() 
)

Fill points by index nodes.

This function creates a new query object that can be used to set (modify) attributes of existing points.

Please have a look at select() for details about the filter expression.

See Also
riegl::rdb::pointcloud::QueryFill

Instead of modifying all points of the point cloud this variant just modifies the points contained in the given nodes. See notes about LOD for details.

Parameters
[in]nodesIDs of index graph nodes
[in]filteroptional point filter expression
std::string riegl::rdb::Pointcloud::getUUID ( ) const

Get database file's UUID.

Returns
the Universally Unique Identifier of the database file
Note
Database files created with rdblib prior version 2.1.2 do not have a UUID. In this case the "nil" UUID is returned. If no database is opened, an empty string is returned.
pointcloud::QueryInsert riegl::rdb::Pointcloud::insert ( )

Insert points.

This function creates a new query object that can be used to insert (new) points into the database.

See Also
riegl::rdb::pointcloud::QueryInsert
Examples:
rdb-example-02-insert-points.cpp.
std::string riegl::rdb::Pointcloud::inspect ( const std::uint8_t  format)

File statistics and debugging information.

This function returns statistics and debugging information about the database file which is intended for factory usage only (i.e. the format may change at any time and the content is undocumented).

pointcloud::QueryInvert riegl::rdb::Pointcloud::invert ( const std::string &  filter = std::string())

Invert points.

This function creates a new query object that can be used to invert attributes of existing points.

Please have a look at select() for details about the filter expression.

See Also
riegl::rdb::pointcloud::QueryInvert
Parameters
[in]filteroptional point filter expression
Examples:
rdb-example-08-invert-points.cpp.
pointcloud::QueryInvert riegl::rdb::Pointcloud::invert ( const pointcloud::GraphNode::ID node,
const std::string &  filter = std::string() 
)

Invert points by index node.

This function creates a new query object that can be used to invert attributes of existing points.

Please have a look at select() for details about the filter expression.

See Also
riegl::rdb::pointcloud::QueryInvert

Instead of inverting all points of the point cloud this variant just inverts the points contained in a single node. See notes about LOD for details.

Parameters
[in]nodeID of index graph node
[in]filteroptional point filter expression
pointcloud::QueryInvert riegl::rdb::Pointcloud::invert ( const std::vector< pointcloud::GraphNode::ID > &  nodes,
const std::string &  filter = std::string() 
)

Invert points by index nodes.

This function creates a new query object that can be used to invert attributes of existing points.

Please have a look at select() for details about the filter expression.

See Also
riegl::rdb::pointcloud::QueryInvert

Instead of inverting all points of the point cloud this variant just inverts the points contained in the given nodes. See notes about LOD for details.

Parameters
[in]nodesIDs of index graph nodes
[in]filteroptional point filter expression
bool riegl::rdb::Pointcloud::isEmpty ( ) const

Check if a database is empty.

Returns
true if the database contains no points or no database is open
bool riegl::rdb::Pointcloud::isOpen ( ) const

Check if a database is open.

Returns
true if a database is open
pointcloud::Management& riegl::rdb::Pointcloud::management ( )

Basic point cloud management interface.

See Also
riegl::rdb::pointcloud::Management
Examples:
rdb-example-09-cleanup-database.cpp.
const pointcloud::Management& riegl::rdb::Pointcloud::management ( ) const

Basic point cloud management interface.

See Also
riegl::rdb::pointcloud::Management
pointcloud::MetaData& riegl::rdb::Pointcloud::metaData ( )

Manage point cloud meta data.

See Also
riegl::rdb::pointcloud::MetaData
const pointcloud::MetaData& riegl::rdb::Pointcloud::metaData ( ) const

Manage point cloud meta data.

See Also
riegl::rdb::pointcloud::MetaData
void riegl::rdb::Pointcloud::open ( const std::string &  location,
const pointcloud::OpenSettings settings 
)

Open existing database.

Open existing database location. If the given database does not exist, an exception is thrown.

Parameters
[in]locationdatabase location (filename)
[in]settingsdatabase open settings
Examples:
rdb-example-02-insert-points.cpp, rdb-example-03-select-points.cpp, rdb-example-04-update-points.cpp, rdb-example-05-remove-points.cpp, rdb-example-06-database-stat.cpp, rdb-example-07-fill-points.cpp, rdb-example-08-invert-points.cpp, rdb-example-09-cleanup-database.cpp, and rdb-example-10-attribute-groups.cpp.
pointcloud::PointAttributes& riegl::rdb::Pointcloud::pointAttribute ( )
const pointcloud::PointAttributes& riegl::rdb::Pointcloud::pointAttribute ( ) const

Manage point attributes.

See Also
riegl::rdb::pointcloud::PointAttributes
pointcloud::QueryRemove riegl::rdb::Pointcloud::remove ( )

Remove points.

This function creates a new query object that can be used to remove (delete) existing points.

See Also
riegl::rdb::pointcloud::QueryRemove
Examples:
rdb-example-05-remove-points.cpp.
pointcloud::QuerySelect riegl::rdb::Pointcloud::select ( const std::string &  filter = std::string())

Select points.

This function creates a new query object that can be used to select (read) attributes of existing points.
The optional filter expression can be used to select particular points - if no filter is given, all points will be loaded.

Filter expression operators:

operator meaning
== equality (left == right)
!= inequality (left != right)
< less than (left < right)
<= less than or equal to (left <= right)
> greater than (left > right)
>= greater than or equal to (left >= right)
&& conjunction (left && right)
|| disjunction (left || right)
% unsigned modulo (left % right)

Filter expression syntax:

  • constant = integer | double | variable > ':' > ('minimum' | 'maximum' | 'default' | 'invalid')
  • variable = [a-zA-Z] > ([0-9a-zA-Z] | '_' | '.')*
  • operand = constant | variable | expression
  • expression = (operand)? > operator > operand

Filter expression examples:

  • "" (empty string means "all points")
  • "amplitude > 5.0"
  • "(reflectance > 0.0) && (selected == 1)"
  • "point_count != point_count:invalid"
  • "(id % 2) == 0"

Stored filters:

Filters can also be stored in the metadata as riegl.stored_filters. All activated filters of this list will be applied in addition to the filter specified by the application (conjunction). To temporarily ignore (override) all stored filters, insert "!!" at the beginning or end of the filter string (e.g. "!! riegl.id == 1" or "riegl.id == 1 !!").

See Also
riegl::rdb::pointcloud::QuerySelect
Parameters
[in]filteroptional point filter expression
Examples:
rdb-example-03-select-points.cpp, rdb-example-04-update-points.cpp, and rdb-example-05-remove-points.cpp.
pointcloud::QuerySelect riegl::rdb::Pointcloud::select ( const pointcloud::GraphNode::ID node,
const std::string &  filter = std::string() 
)

Select points by index node.

This function creates a new query object that can be used to select (read) attributes of existing points.
The optional filter expression can be used to select particular points - if no filter is given, all points will be loaded.

Filter expression operators:

operator meaning
== equality (left == right)
!= inequality (left != right)
< less than (left < right)
<= less than or equal to (left <= right)
> greater than (left > right)
>= greater than or equal to (left >= right)
&& conjunction (left && right)
|| disjunction (left || right)
% unsigned modulo (left % right)

Filter expression syntax:

  • constant = integer | double | variable > ':' > ('minimum' | 'maximum' | 'default' | 'invalid')
  • variable = [a-zA-Z] > ([0-9a-zA-Z] | '_' | '.')*
  • operand = constant | variable | expression
  • expression = (operand)? > operator > operand

Filter expression examples:

  • "" (empty string means "all points")
  • "amplitude > 5.0"
  • "(reflectance > 0.0) && (selected == 1)"
  • "point_count != point_count:invalid"
  • "(id % 2) == 0"

Stored filters:

Filters can also be stored in the metadata as riegl.stored_filters. All activated filters of this list will be applied in addition to the filter specified by the application (conjunction). To temporarily ignore (override) all stored filters, insert "!!" at the beginning or end of the filter string (e.g. "!! riegl.id == 1" or "riegl.id == 1 !!").

See Also
riegl::rdb::pointcloud::QuerySelect

Instead of loading all points of the point cloud this variant just loads the points contained in a single node. See notes about LOD for details.

Parameters
[in]nodeID of index graph node
[in]filteroptional point filter expression
pointcloud::QuerySelect riegl::rdb::Pointcloud::select ( const std::vector< pointcloud::GraphNode::ID > &  nodes,
const std::string &  filter = std::string() 
)

Select points by index nodes.

This function creates a new query object that can be used to select (read) attributes of existing points.
The optional filter expression can be used to select particular points - if no filter is given, all points will be loaded.

Filter expression operators:

operator meaning
== equality (left == right)
!= inequality (left != right)
< less than (left < right)
<= less than or equal to (left <= right)
> greater than (left > right)
>= greater than or equal to (left >= right)
&& conjunction (left && right)
|| disjunction (left || right)
% unsigned modulo (left % right)

Filter expression syntax:

  • constant = integer | double | variable > ':' > ('minimum' | 'maximum' | 'default' | 'invalid')
  • variable = [a-zA-Z] > ([0-9a-zA-Z] | '_' | '.')*
  • operand = constant | variable | expression
  • expression = (operand)? > operator > operand

Filter expression examples:

  • "" (empty string means "all points")
  • "amplitude > 5.0"
  • "(reflectance > 0.0) && (selected == 1)"
  • "point_count != point_count:invalid"
  • "(id % 2) == 0"

Stored filters:

Filters can also be stored in the metadata as riegl.stored_filters. All activated filters of this list will be applied in addition to the filter specified by the application (conjunction). To temporarily ignore (override) all stored filters, insert "!!" at the beginning or end of the filter string (e.g. "!! riegl.id == 1" or "riegl.id == 1 !!").

See Also
riegl::rdb::pointcloud::QuerySelect

Instead of loading all points of the point cloud this variant just loads the points contained in the given nodes. See notes about LOD for details.

Parameters
[in]nodesIDs of index graph nodes
[in]filteroptional point filter expression
pointcloud::QueryStat riegl::rdb::Pointcloud::stat ( )

Query point statistics.

This function creates a new query object that can be used to get point attribute statistics like minimum and maximum value.

See Also
riegl::rdb::pointcloud::QueryStat
Examples:
rdb-example-06-database-stat.cpp.
pointcloud::Transactions& riegl::rdb::Pointcloud::transaction ( )

Manage point cloud transactions.

See Also
riegl::rdb::pointcloud::Transactions
const pointcloud::Transactions& riegl::rdb::Pointcloud::transaction ( ) const

Manage point cloud transactions.

See Also
riegl::rdb::pointcloud::Transactions
pointcloud::QueryUpdate riegl::rdb::Pointcloud::update ( )

Update points.

This function creates a new query object that can be used to update (modify) attributes of existing points.

See Also
riegl::rdb::pointcloud::QueryUpdate
Examples:
rdb-example-04-update-points.cpp.

Friends And Related Function Documentation

Definition at line 478 of file pointcloud.hpp.


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