|
QGIS API Documentation 4.1.0-Master (60fea48833c)
|
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 &url, const QString &authcfg=QString()) |
| Loads the index from a url. | |
| 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. | |
| QList< QgsPointCloudNodeId > | updatedNodes () const |
| Returns a list of node IDs that have been modified. | |
| bool | updateNodeData (const QHash< QgsPointCloudNodeId, QByteArray > &data) |
| Tries to update the data for the specified nodes. | |
| QString | uri () const |
| Returns the uri used to load the index. | |
| 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 406 of file qgspointcloudindex.h.
|
explicit |
Construct wrapper, takes ownership of index.
Definition at line 330 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 356 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 422 of file qgspointcloudindex.cpp.
| QgsPointCloudAttributeCollection QgsPointCloudIndex::attributes | ( | ) | const |
Returns all attributes that are stored in the file.
Definition at line 410 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 511 of file qgspointcloudindex.cpp.
| QgsCoordinateReferenceSystem QgsPointCloudIndex::crs | ( | ) | const |
Returns the coordinate reference system of the point cloud index.
Definition at line 362 of file qgspointcloudindex.cpp.
| QString QgsPointCloudIndex::error | ( | ) | const |
Returns the error that occurred during the loading of the index.
Definition at line 351 of file qgspointcloudindex.cpp.
| QgsRectangle QgsPointCloudIndex::extent | ( | ) | const |
Returns extent of the data.
Definition at line 434 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 505 of file qgspointcloudindex.cpp.
|
inline |
Returns pointer to the implementation class.
Definition at line 416 of file qgspointcloudindex.h.
| QgsPointCloudNode QgsPointCloudIndex::getNode | ( | const QgsPointCloudNodeId & | id | ) | const |
Returns object for a given node.
Definition at line 404 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 493 of file qgspointcloudindex.cpp.
| bool QgsPointCloudIndex::hasNode | ( | const QgsPointCloudNodeId & | id | ) | const |
Returns whether the octree contain given node.
Definition at line 398 of file qgspointcloudindex.cpp.
| bool QgsPointCloudIndex::isModified | ( | ) | const |
Returns true if there are uncommitted changes, false otherwise.
Definition at line 520 of file qgspointcloudindex.cpp.
| bool QgsPointCloudIndex::isValid | ( | ) | const |
Returns whether index is loaded and valid.
Definition at line 346 of file qgspointcloudindex.cpp.
| void QgsPointCloudIndex::load | ( | const QString & | url, |
| const QString & | authcfg = QString() ) |
Loads the index from a url.
| url | The URL to load the index from. Can be a local file or an http(s) URL. |
| authcfg | Optionally apply this authentication configuration for network requests (since QGIS 4.0) |
Definition at line 340 of file qgspointcloudindex.cpp.
| QgsPointCloudStatistics QgsPointCloudIndex::metadataStatistics | ( | ) | const |
Returns the object containing the statistics metadata extracted from the dataset.
Definition at line 380 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 416 of file qgspointcloudindex.cpp.
| QgsVector3D QgsPointCloudIndex::offset | ( | ) | const |
Returns offset of data from CRS.
Definition at line 463 of file qgspointcloudindex.cpp.
| QgsPointCloudIndex::operator bool | ( | ) | const |
Checks if index is non-null.
Definition at line 335 of file qgspointcloudindex.cpp.
| QVariantMap QgsPointCloudIndex::originalMetadata | ( | ) | const |
Returns the original metadata map.
Definition at line 374 of file qgspointcloudindex.cpp.
| qint64 QgsPointCloudIndex::pointCount | ( | ) | const |
Returns the number of points in the point cloud.
Definition at line 368 of file qgspointcloudindex.cpp.
| QgsPointCloudNodeId QgsPointCloudIndex::root | ( | ) | const |
Returns root node of the index.
Definition at line 392 of file qgspointcloudindex.cpp.
| QgsBox3D QgsPointCloudIndex::rootNodeBounds | ( | ) | const |
Returns bounding box of root node in CRS coords.
Definition at line 451 of file qgspointcloudindex.cpp.
| QgsVector3D QgsPointCloudIndex::scale | ( | ) | const |
Returns scale of data relative to CRS.
Definition at line 457 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 481 of file qgspointcloudindex.cpp.
| int QgsPointCloudIndex::span | ( | ) | const |
Returns the number of points in one direction in a single node.
Definition at line 469 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 499 of file qgspointcloudindex.cpp.
| QString QgsPointCloudIndex::subsetString | ( | ) | const |
Returns the string used to define a subset of the point cloud.
Definition at line 487 of file qgspointcloudindex.cpp.
| QList< QgsPointCloudNodeId > QgsPointCloudIndex::updatedNodes | ( | ) | const |
Returns a list of node IDs that have been modified.
Definition at line 528 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 428 of file qgspointcloudindex.cpp.
| QString QgsPointCloudIndex::uri | ( | ) | const |
Returns the uri used to load the index.
Definition at line 475 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 386 of file qgspointcloudindex.cpp.
| double QgsPointCloudIndex::zMax | ( | ) | const |
Returns z max.
Definition at line 445 of file qgspointcloudindex.cpp.
| double QgsPointCloudIndex::zMin | ( | ) | const |
Returns z min.
Definition at line 440 of file qgspointcloudindex.cpp.
|
friend |
Definition at line 658 of file qgspointcloudindex.h.