|
QGIS API Documentation 4.1.0-Master (467af3bbe65)
|
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 (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 (QgsPointCloudNodeId id) const |
| Returns object for a given node. | |
| QgsPointCloudBlock * | getNodeDataFromCache (QgsPointCloudNodeId node, const QgsPointCloudRequest &request) |
| Fetches the requested node data from the cache for the specified node and request. | |
| bool | hasNode (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 (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, 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 412 of file qgspointcloudindex.h.
|
explicit |
Construct wrapper, takes ownership of index.
Definition at line 321 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 347 of file qgspointcloudindex.cpp.
| QgsPointCloudBlockRequest * QgsPointCloudIndex::asyncNodeData | ( | 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 413 of file qgspointcloudindex.cpp.
| QgsPointCloudAttributeCollection QgsPointCloudIndex::attributes | ( | ) | const |
Returns all attributes that are stored in the file.
Definition at line 401 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 502 of file qgspointcloudindex.cpp.
| QgsCoordinateReferenceSystem QgsPointCloudIndex::crs | ( | ) | const |
Returns the coordinate reference system of the point cloud index.
Definition at line 353 of file qgspointcloudindex.cpp.
| QString QgsPointCloudIndex::error | ( | ) | const |
Returns the error that occurred during the loading of the index.
Definition at line 342 of file qgspointcloudindex.cpp.
| QgsRectangle QgsPointCloudIndex::extent | ( | ) | const |
Returns extent of the data.
Definition at line 425 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 496 of file qgspointcloudindex.cpp.
|
inline |
Returns pointer to the implementation class.
Definition at line 422 of file qgspointcloudindex.h.
| QgsPointCloudNode QgsPointCloudIndex::getNode | ( | QgsPointCloudNodeId | id | ) | const |
Returns object for a given node.
Definition at line 395 of file qgspointcloudindex.cpp.
| QgsPointCloudBlock * QgsPointCloudIndex::getNodeDataFromCache | ( | 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 484 of file qgspointcloudindex.cpp.
| bool QgsPointCloudIndex::hasNode | ( | QgsPointCloudNodeId | id | ) | const |
Returns whether the octree contain given node.
Definition at line 389 of file qgspointcloudindex.cpp.
| bool QgsPointCloudIndex::isModified | ( | ) | const |
Returns true if there are uncommitted changes, false otherwise.
Definition at line 511 of file qgspointcloudindex.cpp.
| bool QgsPointCloudIndex::isValid | ( | ) | const |
Returns whether index is loaded and valid.
Definition at line 337 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 331 of file qgspointcloudindex.cpp.
| QgsPointCloudStatistics QgsPointCloudIndex::metadataStatistics | ( | ) | const |
Returns the object containing the statistics metadata extracted from the dataset.
Definition at line 371 of file qgspointcloudindex.cpp.
| std::unique_ptr< QgsPointCloudBlock > QgsPointCloudIndex::nodeData | ( | 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 407 of file qgspointcloudindex.cpp.
| QgsVector3D QgsPointCloudIndex::offset | ( | ) | const |
Returns offset of data from CRS.
Definition at line 454 of file qgspointcloudindex.cpp.
| QgsPointCloudIndex::operator bool | ( | ) | const |
Checks if index is non-null.
Definition at line 326 of file qgspointcloudindex.cpp.
| QVariantMap QgsPointCloudIndex::originalMetadata | ( | ) | const |
Returns the original metadata map.
Definition at line 365 of file qgspointcloudindex.cpp.
| qint64 QgsPointCloudIndex::pointCount | ( | ) | const |
Returns the number of points in the point cloud.
Definition at line 359 of file qgspointcloudindex.cpp.
| QgsPointCloudNodeId QgsPointCloudIndex::root | ( | ) | const |
Returns root node of the index.
Definition at line 383 of file qgspointcloudindex.cpp.
| QgsBox3D QgsPointCloudIndex::rootNodeBounds | ( | ) | const |
Returns bounding box of root node in CRS coords.
Definition at line 442 of file qgspointcloudindex.cpp.
| QgsVector3D QgsPointCloudIndex::scale | ( | ) | const |
Returns scale of data relative to CRS.
Definition at line 448 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 472 of file qgspointcloudindex.cpp.
| int QgsPointCloudIndex::span | ( | ) | const |
Returns the number of points in one direction in a single node.
Definition at line 460 of file qgspointcloudindex.cpp.
| void QgsPointCloudIndex::storeNodeDataToCache | ( | QgsPointCloudBlock * | data, |
| 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 490 of file qgspointcloudindex.cpp.
| QString QgsPointCloudIndex::subsetString | ( | ) | const |
Returns the string used to define a subset of the point cloud.
Definition at line 478 of file qgspointcloudindex.cpp.
| QList< QgsPointCloudNodeId > QgsPointCloudIndex::updatedNodes | ( | ) | const |
Returns a list of node IDs that have been modified.
Definition at line 519 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 419 of file qgspointcloudindex.cpp.
| QString QgsPointCloudIndex::uri | ( | ) | const |
Returns the uri used to load the index.
Definition at line 466 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 377 of file qgspointcloudindex.cpp.
| double QgsPointCloudIndex::zMax | ( | ) | const |
Returns z max.
Definition at line 436 of file qgspointcloudindex.cpp.
| double QgsPointCloudIndex::zMin | ( | ) | const |
Returns z min.
Definition at line 431 of file qgspointcloudindex.cpp.
|
friend |
Definition at line 664 of file qgspointcloudindex.h.