|
QGIS API Documentation 4.1.0-Master (376402f9aeb)
|
Represents an indexed point clouds data in octree. More...
#include <qgspointcloudindex.h>

Public Member Functions | |
| QgsAbstractPointCloudIndex () | |
| Constructs index. | |
| virtual | ~QgsAbstractPointCloudIndex () |
| virtual Qgis::PointCloudAccessType | accessType () const =0 |
| 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 ). | |
| virtual QgsPointCloudBlockRequest * | asyncNodeData (QgsPointCloudNodeId n, const QgsPointCloudRequest &request)=0 |
| Returns a handle responsible for loading a node data block. | |
| QgsPointCloudAttributeCollection | attributes () const |
| Returns all attributes that are stored in the file. | |
| void | copyCommonProperties (QgsAbstractPointCloudIndex *destination) const |
| Copies common properties to the destination index. | |
| virtual QgsCoordinateReferenceSystem | crs () const =0 |
| 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. | |
| virtual QVariantMap | extraMetadata () const |
| Returns extra metadata that's not accessible through the other methods in an implementation-specific dynamic structure. | |
| virtual 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. | |
| virtual bool | hasNode (QgsPointCloudNodeId n) const |
| Returns whether the octree contain given node. | |
| virtual bool | isValid () const =0 |
| Returns whether index is loaded and valid. | |
| virtual void | load (const QString &uri, const QString &authcfg=QString())=0 |
| Loads the index from the uri, using an optional authcfg for network requests. | |
| virtual QgsPointCloudStatistics | metadataStatistics () const |
| Returns the object containing the statistics metadata extracted from the dataset. | |
| virtual bool | needsHierarchyFetching (const QgsPointCloudNodeId &) const |
| Returns whether calling getNode() for node will trigger a hierarchy page fetch. | |
| virtual std::unique_ptr< QgsPointCloudBlock > | nodeData (QgsPointCloudNodeId n, const QgsPointCloudRequest &request)=0 |
| Returns node data block. | |
| QgsVector3D | offset () const |
| Returns offset of data from CRS. | |
| virtual QVariantMap | originalMetadata () const =0 |
| Returns the original metadata map. | |
| virtual qint64 | pointCount () const =0 |
| 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. | |
| virtual 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) const |
| Stores existing data to the cache for the specified node and request. | |
| virtual QString | subsetString () const |
| Returns the string used to define a subset of the point cloud. | |
| virtual 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. | |
| virtual 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. | |
Static Public Member Functions | |
| static void | storeNodeDataToCacheStatic (QgsPointCloudBlock *data, QgsPointCloudNodeId node, const QgsPointCloudRequest &request, const QgsPointCloudExpression &expression, const QString &uri) |
| Stores existing data to the cache for the specified node, request, expression and uri. | |
Protected Member Functions | |
| void | setAttributes (const QgsPointCloudAttributeCollection &attributes) |
| Sets native attributes of the data. | |
Protected Attributes | |
| QgsPointCloudAttributeCollection | mAttributes |
| QString | mAuthCfg |
| QString | mError |
| QgsRectangle | mExtent |
| 2D extent of data | |
| QgsPointCloudExpression | mFilterExpression |
| The filter expression to be evaluated when fetching node data. | |
| QHash< QgsPointCloudNodeId, int > | mHierarchy |
| Data hierarchy. | |
| QMutex | mHierarchyMutex |
| QgsVector3D | mOffset |
| Offset of our int32 coordinates compared to CRS coords. | |
| QgsBox3D | mRootBounds |
| Bounds of the root node's cube (in int32 coordinates). | |
| QgsVector3D | mScale |
| Scale of our int32 coordinates compared to CRS coords. | |
| int | mSpan = 0 |
| All native attributes stored in the file. | |
| QString | mUri |
| double | mZMax = 0 |
| Vertical extent of data. | |
| double | mZMin = 0 |
Static Protected Attributes | |
| static QCache< QgsPointCloudCacheKey, QgsPointCloudBlock > | sBlockCache |
| static QMutex | sBlockCacheMutex |
Represents an indexed point clouds data in octree.
Definition at line 227 of file qgspointcloudindex.h.
|
explicitdefault |
Constructs index.
|
virtualdefault |
|
pure virtual |
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 ).
Implemented in QgsPointCloudEditingIndex.
|
pure virtual |
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
Implemented in QgsPointCloudEditingIndex.
| QgsPointCloudAttributeCollection QgsAbstractPointCloudIndex::attributes | ( | ) | const |
Returns all attributes that are stored in the file.
Definition at line 196 of file qgspointcloudindex.cpp.
| void QgsAbstractPointCloudIndex::copyCommonProperties | ( | QgsAbstractPointCloudIndex * | destination | ) | const |
Copies common properties to the destination index.
Definition at line 269 of file qgspointcloudindex.cpp.
|
pure virtual |
Returns the coordinate reference system of the point cloud index.
Implemented in QgsPointCloudEditingIndex.
|
inline |
Returns the error that occurred during the loading of the index.
Definition at line 244 of file qgspointcloudindex.h.
|
inline |
Returns extent of the data.
Definition at line 318 of file qgspointcloudindex.h.
|
virtual |
Returns extra metadata that's not accessible through the other methods in an implementation-specific dynamic structure.
Definition at line 315 of file qgspointcloudindex.cpp.
|
virtual |
Returns object for a given node.
Reimplemented in QgsPointCloudEditingIndex.
Definition at line 174 of file qgspointcloudindex.cpp.
| QgsPointCloudBlock * QgsAbstractPointCloudIndex::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 285 of file qgspointcloudindex.cpp.
|
virtual |
Returns whether the octree contain given node.
Reimplemented in QgsPointCloudEditingIndex.
Definition at line 168 of file qgspointcloudindex.cpp.
|
pure virtual |
Returns whether index is loaded and valid.
Implemented in QgsPointCloudEditingIndex.
|
pure virtual |
Loads the index from the uri, using an optional authcfg for network requests.
Implemented in QgsPointCloudEditingIndex.
|
virtual |
Returns the object containing the statistics metadata extracted from the dataset.
Definition at line 250 of file qgspointcloudindex.cpp.
|
inlinevirtual |
Returns whether calling getNode() for node will trigger a hierarchy page fetch.
If any of the node's ancestors, children and grand-children info exist in a hierarchy page that has not yet been loaded, it will return true.
Definition at line 400 of file qgspointcloudindex.h.
|
pure virtual |
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
Implemented in QgsPointCloudEditingIndex.
| QgsVector3D QgsAbstractPointCloudIndex::offset | ( | ) | const |
Returns offset of data from CRS.
Definition at line 206 of file qgspointcloudindex.cpp.
|
pure virtual |
Returns the original metadata map.
Implemented in QgsPointCloudEditingIndex.
|
pure virtual |
Returns the number of points in the point cloud.
Implemented in QgsPointCloudEditingIndex.
|
inline |
Returns root node of the index.
Definition at line 275 of file qgspointcloudindex.h.
|
inline |
Returns bounding box of root node in CRS coords.
Definition at line 326 of file qgspointcloudindex.h.
| QgsVector3D QgsAbstractPointCloudIndex::scale | ( | ) | const |
Returns scale of data relative to CRS.
Definition at line 201 of file qgspointcloudindex.cpp.
|
protected |
Sets native attributes of the data.
Definition at line 211 of file qgspointcloudindex.cpp.
|
virtual |
Sets the string used to define a subset of the point cloud.
| subset | The subset string to be used in a QgsPointCloudExpression |
Reimplemented in QgsPointCloudEditingIndex.
Definition at line 221 of file qgspointcloudindex.cpp.
| int QgsAbstractPointCloudIndex::span | ( | ) | const |
Returns the number of points in one direction in a single node.
Definition at line 216 of file qgspointcloudindex.cpp.
| void QgsAbstractPointCloudIndex::storeNodeDataToCache | ( | QgsPointCloudBlock * | data, |
| QgsPointCloudNodeId | node, | ||
| const QgsPointCloudRequest & | request ) const |
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 294 of file qgspointcloudindex.cpp.
|
static |
Stores existing data to the cache for the specified node, request, expression and uri.
Ownership is not transferred, block gets cloned in the cache.
Definition at line 299 of file qgspointcloudindex.cpp.
|
virtual |
Returns the string used to define a subset of the point cloud.
Reimplemented in QgsPointCloudEditingIndex.
Definition at line 245 of file qgspointcloudindex.cpp.
|
virtual |
Tries to update the data for the specified nodes.
Subclasses that support editing should override this to handle storing the data. Default implementation does nothing, returns false.
true on success, otherwise false Reimplemented in QgsPointCloudEditingIndex.
Definition at line 191 of file qgspointcloudindex.cpp.
|
inline |
Returns the URI used to load the index.
Definition at line 391 of file qgspointcloudindex.h.
|
virtual |
Writes the statistics object stats into the backing file, if possible.
Returns true if the data was written successfully.
Definition at line 263 of file qgspointcloudindex.cpp.
|
inline |
Returns z max.
Definition at line 323 of file qgspointcloudindex.h.
|
inline |
Returns z min.
Definition at line 321 of file qgspointcloudindex.h.
|
protected |
Definition at line 414 of file qgspointcloudindex.h.
|
protected |
Definition at line 420 of file qgspointcloudindex.h.
|
protected |
Definition at line 418 of file qgspointcloudindex.h.
|
protected |
2D extent of data
Definition at line 406 of file qgspointcloudindex.h.
|
protected |
The filter expression to be evaluated when fetching node data.
Definition at line 416 of file qgspointcloudindex.h.
|
mutableprotected |
Data hierarchy.
Definition at line 410 of file qgspointcloudindex.h.
|
mutableprotected |
Definition at line 409 of file qgspointcloudindex.h.
|
protected |
Offset of our int32 coordinates compared to CRS coords.
Definition at line 412 of file qgspointcloudindex.h.
|
protected |
Bounds of the root node's cube (in int32 coordinates).
Definition at line 413 of file qgspointcloudindex.h.
|
protected |
Scale of our int32 coordinates compared to CRS coords.
Definition at line 411 of file qgspointcloudindex.h.
|
protected |
All native attributes stored in the file.
Number of points in one direction in a single node
Definition at line 415 of file qgspointcloudindex.h.
|
protected |
Definition at line 419 of file qgspointcloudindex.h.
|
protected |
Vertical extent of data.
Definition at line 407 of file qgspointcloudindex.h.
|
protected |
Definition at line 407 of file qgspointcloudindex.h.
|
staticprotected |
Definition at line 422 of file qgspointcloudindex.h.
|
staticprotected |
Definition at line 421 of file qgspointcloudindex.h.