QGIS API Documentation 3.41.0-Master (d2aaa9c6e02)
|
Smart pointer for QgsAbstractPointCloudIndex. More...
#include <qgspointcloudindex.h>
Public Member Functions | |
QgsPointCloudIndex (QgsAbstractPointCloudIndex *index=nullptr) | |
Construct wrapper, takes ownership of index. | |
Qgis::PointCloudAccessType | accessType () const |
Returns the access type of the data If the access type is Remote, data will be fetched from an HTTP server either synchronously or asynchronously If the access type is local, the data is stored locally as a file and will only be fetch synchronously ( blocking request with nodeData only ) | |
QgsPointCloudBlockRequest * | asyncNodeData (const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request) |
Returns a handle responsible for loading a node data block. | |
QgsPointCloudAttributeCollection | attributes () const |
Returns all attributes that are stored in the file. | |
bool | commitChanges (QString *errorMessage=nullptr) |
Tries to store pending changes to the data provider. | |
QgsCoordinateReferenceSystem | crs () const |
Returns the coordinate reference system of the point cloud index. | |
QString | error () const |
Returns the error that occurred during the loading of the index. | |
QgsRectangle | extent () const |
Returns extent of the data. | |
QVariantMap | extraMetadata () const |
Returns extra metadata that's not accessible through the other methods in an implementation-specific dynamic structure. | |
QgsAbstractPointCloudIndex * | get () |
Returns pointer to the implementation class. | |
QgsPointCloudNode | getNode (const QgsPointCloudNodeId &id) const |
Returns object for a given node. | |
QgsPointCloudBlock * | getNodeDataFromCache (const QgsPointCloudNodeId &node, const QgsPointCloudRequest &request) |
Fetches the requested node data from the cache for the specified node and request. | |
bool | hasNode (const QgsPointCloudNodeId &id) const |
Returns whether the octree contain given node. | |
bool | isModified () const |
Returns true if there are uncommitted changes, false otherwise. | |
bool | isValid () const |
Returns whether index is loaded and valid. | |
void | load (const QString &fileName) |
Loads the index from the file. | |
QgsPointCloudStatistics | metadataStatistics () const |
Returns the object containing the statistics metadata extracted from the dataset. | |
std::unique_ptr< QgsPointCloudBlock > | nodeData (const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request) |
Returns node data block. | |
QgsVector3D | offset () const |
Returns offset of data from CRS. | |
operator bool () const | |
Checks if index is non-null. | |
QVariantMap | originalMetadata () const |
Returns the original metadata map. | |
qint64 | pointCount () const |
Returns the number of points in the point cloud. | |
QgsPointCloudNodeId | root () const |
Returns root node of the index. | |
QgsBox3D | rootNodeBounds () const |
Returns bounding box of root node in CRS coords. | |
QgsVector3D | scale () const |
Returns scale of data relative to CRS. | |
bool | setSubsetString (const QString &subset) |
Sets the string used to define a subset of the point cloud. | |
int | span () const |
Returns the number of points in one direction in a single node. | |
void | storeNodeDataToCache (QgsPointCloudBlock *data, const QgsPointCloudNodeId &node, const QgsPointCloudRequest &request) |
Stores existing data to the cache for the specified node and request. | |
QString | subsetString () const |
Returns the string used to define a subset of the point cloud. | |
bool | updateNodeData (const QHash< QgsPointCloudNodeId, QByteArray > &data) |
Tries to update the data for the specified nodes. | |
bool | writeStatistics (QgsPointCloudStatistics &stats) |
Writes the statistics object stats into the backing file, if possible. | |
double | zMax () const |
Returns z max. | |
double | zMin () const |
Returns z min. | |
Friends | |
class | TestQgsPointCloudEditing |
Smart pointer for QgsAbstractPointCloudIndex.
This is a wrapper for QgsAbstractPointCloudIndex, an index for point cloud layers. It contains a shared_pointer, ensuring that concurrent access to the index is memory safe.
Definition at line 416 of file qgspointcloudindex.h.
|
explicit |
Construct wrapper, takes ownership of index.
Definition at line 331 of file qgspointcloudindex.cpp.
Qgis::PointCloudAccessType QgsPointCloudIndex::accessType | ( | ) | const |
Returns the access type of the data If the access type is Remote, data will be fetched from an HTTP server either synchronously or asynchronously If the access type is local, the data is stored locally as a file and will only be fetch synchronously ( blocking request with nodeData only )
Definition at line 357 of file qgspointcloudindex.cpp.
QgsPointCloudBlockRequest * QgsPointCloudIndex::asyncNodeData | ( | const QgsPointCloudNodeId & | n, |
const QgsPointCloudRequest & | request | ||
) |
Returns a handle responsible for loading a node data block.
e.g. positions (needs to be scaled and offset applied to get coordinates) or classification, intensity or custom attributes
It is caller responsibility to free the handle and the block issued by the handle if the loading succeeds.
May return nullptr in case the node is not present or any other problem with loading
Definition at line 423 of file qgspointcloudindex.cpp.
QgsPointCloudAttributeCollection QgsPointCloudIndex::attributes | ( | ) | const |
Returns all attributes that are stored in the file.
Definition at line 411 of file qgspointcloudindex.cpp.
bool QgsPointCloudIndex::commitChanges | ( | QString * | errorMessage = nullptr | ) |
Tries to store pending changes to the data provider.
If errorMessage is not a null pointer, it will receive an error message in case the call failed.
true
on success, otherwise false
Definition at line 507 of file qgspointcloudindex.cpp.
QgsCoordinateReferenceSystem QgsPointCloudIndex::crs | ( | ) | const |
Returns the coordinate reference system of the point cloud index.
Definition at line 363 of file qgspointcloudindex.cpp.
QString QgsPointCloudIndex::error | ( | ) | const |
Returns the error that occurred during the loading of the index.
Definition at line 352 of file qgspointcloudindex.cpp.
QgsRectangle QgsPointCloudIndex::extent | ( | ) | const |
Returns extent of the data.
Definition at line 435 of file qgspointcloudindex.cpp.
QVariantMap QgsPointCloudIndex::extraMetadata | ( | ) | const |
Returns extra metadata that's not accessible through the other methods in an implementation-specific dynamic structure.
Definition at line 501 of file qgspointcloudindex.cpp.
|
inline |
Returns pointer to the implementation class.
Definition at line 426 of file qgspointcloudindex.h.
QgsPointCloudNode QgsPointCloudIndex::getNode | ( | const QgsPointCloudNodeId & | id | ) | const |
Returns object for a given node.
Definition at line 405 of file qgspointcloudindex.cpp.
QgsPointCloudBlock * QgsPointCloudIndex::getNodeDataFromCache | ( | const QgsPointCloudNodeId & | node, |
const QgsPointCloudRequest & | request | ||
) |
Fetches the requested node data from the cache for the specified node and request.
If not found in the cache, nullptr is returned. Caller takes ownership of the returned object.
Definition at line 489 of file qgspointcloudindex.cpp.
bool QgsPointCloudIndex::hasNode | ( | const QgsPointCloudNodeId & | id | ) | const |
Returns whether the octree contain given node.
Definition at line 399 of file qgspointcloudindex.cpp.
bool QgsPointCloudIndex::isModified | ( | ) | const |
Returns true
if there are uncommitted changes, false
otherwise.
Definition at line 516 of file qgspointcloudindex.cpp.
bool QgsPointCloudIndex::isValid | ( | ) | const |
Returns whether index is loaded and valid.
Definition at line 347 of file qgspointcloudindex.cpp.
void QgsPointCloudIndex::load | ( | const QString & | fileName | ) |
Loads the index from the file.
Definition at line 341 of file qgspointcloudindex.cpp.
QgsPointCloudStatistics QgsPointCloudIndex::metadataStatistics | ( | ) | const |
Returns the object containing the statistics metadata extracted from the dataset.
Definition at line 381 of file qgspointcloudindex.cpp.
std::unique_ptr< QgsPointCloudBlock > QgsPointCloudIndex::nodeData | ( | const QgsPointCloudNodeId & | n, |
const QgsPointCloudRequest & | request | ||
) |
Returns node data block.
e.g. positions (needs to be scaled and offset applied to get coordinates) or classification, intensity or custom attributes.
May return nullptr in case the node is not present or any other problem with loading
Definition at line 417 of file qgspointcloudindex.cpp.
QgsVector3D QgsPointCloudIndex::offset | ( | ) | const |
Returns offset of data from CRS.
Definition at line 464 of file qgspointcloudindex.cpp.
QgsPointCloudIndex::operator bool | ( | ) | const |
Checks if index is non-null.
Definition at line 336 of file qgspointcloudindex.cpp.
QVariantMap QgsPointCloudIndex::originalMetadata | ( | ) | const |
Returns the original metadata map.
Definition at line 375 of file qgspointcloudindex.cpp.
qint64 QgsPointCloudIndex::pointCount | ( | ) | const |
Returns the number of points in the point cloud.
Definition at line 369 of file qgspointcloudindex.cpp.
QgsPointCloudNodeId QgsPointCloudIndex::root | ( | ) | const |
Returns root node of the index.
Definition at line 393 of file qgspointcloudindex.cpp.
QgsBox3D QgsPointCloudIndex::rootNodeBounds | ( | ) | const |
Returns bounding box of root node in CRS coords.
Definition at line 452 of file qgspointcloudindex.cpp.
QgsVector3D QgsPointCloudIndex::scale | ( | ) | const |
Returns scale of data relative to CRS.
Definition at line 458 of file qgspointcloudindex.cpp.
bool QgsPointCloudIndex::setSubsetString | ( | const QString & | subset | ) |
Sets the string used to define a subset of the point cloud.
subset | The subset string to be used in a QgsPointCloudExpression |
Definition at line 477 of file qgspointcloudindex.cpp.
int QgsPointCloudIndex::span | ( | ) | const |
Returns the number of points in one direction in a single node.
Definition at line 470 of file qgspointcloudindex.cpp.
void QgsPointCloudIndex::storeNodeDataToCache | ( | QgsPointCloudBlock * | data, |
const QgsPointCloudNodeId & | node, | ||
const QgsPointCloudRequest & | request | ||
) |
Stores existing data to the cache for the specified node and request.
Ownership is not transferred, block gets cloned in the cache.
Definition at line 495 of file qgspointcloudindex.cpp.
QString QgsPointCloudIndex::subsetString | ( | ) | const |
Returns the string used to define a subset of the point cloud.
Definition at line 483 of file qgspointcloudindex.cpp.
bool QgsPointCloudIndex::updateNodeData | ( | const QHash< QgsPointCloudNodeId, QByteArray > & | data | ) |
Tries to update the data for the specified nodes.
true
on success, otherwise false
Definition at line 429 of file qgspointcloudindex.cpp.
bool QgsPointCloudIndex::writeStatistics | ( | QgsPointCloudStatistics & | stats | ) |
Writes the statistics object stats into the backing file, if possible.
Returns true if the data was written successfully.
Definition at line 387 of file qgspointcloudindex.cpp.
double QgsPointCloudIndex::zMax | ( | ) | const |
Returns z max.
Definition at line 446 of file qgspointcloudindex.cpp.
double QgsPointCloudIndex::zMin | ( | ) | const |
Returns z min.
Definition at line 441 of file qgspointcloudindex.cpp.
|
friend |
Definition at line 661 of file qgspointcloudindex.h.