QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
|
Represents a indexed point clouds data in octree. More...
#include <qgspointcloudindex.h>
Public Types | |
enum | AccessType { Local , Remote } |
The access type of the data, local is for local files and remote for remote files (over HTTP) More... | |
Public Member Functions | |
QgsPointCloudIndex () | |
Constructs index. | |
~QgsPointCloudIndex () | |
virtual AccessType | 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 (const IndexedPointCloudNode &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. | |
virtual std::unique_ptr< QgsPointCloudIndex > | clone () const =0 |
Returns a clone of the current point cloud index object. | |
void | copyCommonProperties (QgsPointCloudIndex *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. | |
QgsPointCloudBlock * | getNodeDataFromCache (const IndexedPointCloudNode &node, const QgsPointCloudRequest &request) |
Fetches the requested node data from the cache for the specified node and request. | |
virtual bool | hasNode (const IndexedPointCloudNode &n) const |
Returns whether the octree contain given node. | |
virtual bool | hasStatisticsMetadata () const =0 |
Returns whether the dataset contains metadata of statistics. | |
virtual bool | isValid () const =0 |
Returns whether index is loaded and valid. | |
virtual void | load (const QString &fileName)=0 |
Loads the index from the file. | |
virtual QVariantList | metadataClasses (const QString &attribute) const |
Returns the classes of attribute. | |
virtual QVariant | metadataClassStatistic (const QString &attribute, const QVariant &value, Qgis::Statistic statistic) const |
Returns the statistic statistic of the class value of the attribute attribute. | |
virtual QVariant | metadataStatistic (const QString &attribute, Qgis::Statistic statistic) const |
Returns the statistic statistic of attribute. | |
virtual QgsPointCloudStatistics | metadataStatistics () const |
Returns the object containing the statistics metadata extracted from the dataset. | |
QgsPointCloudDataBounds | nodeBounds (const IndexedPointCloudNode &node) const |
Returns bounds of particular node. | |
virtual QList< IndexedPointCloudNode > | nodeChildren (const IndexedPointCloudNode &n) const |
Returns all children of node. | |
virtual std::unique_ptr< QgsPointCloudBlock > | nodeData (const IndexedPointCloudNode &n, const QgsPointCloudRequest &request)=0 |
Returns node data block. | |
float | nodeError (const IndexedPointCloudNode &n) const |
Returns node's error in map units (used to determine in whether the node has enough detail for the current view) | |
QgsRectangle | nodeMapExtent (const IndexedPointCloudNode &node) const |
Returns the extent of a node in map coordinates. | |
int | nodePointCount (const IndexedPointCloudNode &n) |
Returns the number of points of indexed point cloud node n. | |
virtual qint64 | nodePointCount (const IndexedPointCloudNode &n) const |
Returns the number of points of a given node n. | |
QgsDoubleRange | nodeZRange (const IndexedPointCloudNode &node) const |
Returns the z range of a node. | |
QgsVector3D | offset () const |
Returns offset. | |
virtual QVariantMap | originalMetadata () const =0 |
Returns the original metadata map. | |
virtual qint64 | pointCount () const =0 |
Returns the number of points in the point cloud. | |
IndexedPointCloudNode | root () |
Returns root node of the index. | |
QgsVector3D | scale () const |
Returns scale. | |
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 IndexedPointCloudNode &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. | |
double | zMax () const |
Returns z max. | |
double | zMin () const |
Returns z min. | |
Static Public Member Functions | |
static void | storeNodeDataToCacheStatic (QgsPointCloudBlock *data, const IndexedPointCloudNode &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 | mError |
QgsRectangle | mExtent |
2D extent of data | |
QgsPointCloudExpression | mFilterExpression |
The filter expression to be evaluated when fetching node data. | |
QHash< IndexedPointCloudNode, int > | mHierarchy |
Data hierarchy. | |
QMutex | mHierarchyMutex |
QgsVector3D | mOffset |
Offset of our int32 coordinates compared to CRS coords. | |
QgsPointCloudDataBounds | 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 a indexed point clouds data in octree.
Definition at line 207 of file qgspointcloudindex.h.
The access type of the data, local is for local files and remote for remote files (over HTTP)
Enumerator | |
---|---|
Local | Local means the source is a local file on the machine. |
Remote | Remote means it's loaded through a protocol like HTTP. |
Definition at line 212 of file qgspointcloudindex.h.
|
explicitdefault |
Constructs index.
|
default |
|
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 )
|
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
QgsPointCloudAttributeCollection QgsPointCloudIndex::attributes | ( | ) | const |
Returns all attributes that are stored in the file.
Definition at line 222 of file qgspointcloudindex.cpp.
|
pure virtual |
Returns a clone of the current point cloud index object.
void QgsPointCloudIndex::copyCommonProperties | ( | QgsPointCloudIndex * | destination | ) | const |
Copies common properties to the destination index.
Definition at line 381 of file qgspointcloudindex.cpp.
|
pure virtual |
Returns the coordinate reference system of the point cloud index.
|
inline |
Returns the error that occurred during the loading of the index.
Definition at line 239 of file qgspointcloudindex.h.
|
inline |
Returns extent of the data.
Definition at line 308 of file qgspointcloudindex.h.
QgsPointCloudBlock * QgsPointCloudIndex::getNodeDataFromCache | ( | const IndexedPointCloudNode & | 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 397 of file qgspointcloudindex.cpp.
|
virtual |
Returns whether the octree contain given node.
Definition at line 190 of file qgspointcloudindex.cpp.
|
pure virtual |
Returns whether the dataset contains metadata of statistics.
|
pure virtual |
Returns whether index is loaded and valid.
|
pure virtual |
Loads the index from the file.
|
virtual |
Returns the classes of attribute.
Definition at line 338 of file qgspointcloudindex.cpp.
|
virtual |
Returns the statistic statistic of the class value of the attribute attribute.
Definition at line 344 of file qgspointcloudindex.cpp.
|
virtual |
Returns the statistic statistic of attribute.
Definition at line 318 of file qgspointcloudindex.cpp.
|
virtual |
Returns the object containing the statistics metadata extracted from the dataset.
Definition at line 352 of file qgspointcloudindex.cpp.
QgsPointCloudDataBounds QgsPointCloudIndex::nodeBounds | ( | const IndexedPointCloudNode & | node | ) | const |
Returns bounds of particular node.
Definition at line 227 of file qgspointcloudindex.cpp.
|
virtual |
Returns all children of node.
Definition at line 202 of file qgspointcloudindex.cpp.
|
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
float QgsPointCloudIndex::nodeError | ( | const IndexedPointCloudNode & | n | ) | const |
Returns node's error in map units (used to determine in whether the node has enough detail for the current view)
Definition at line 255 of file qgspointcloudindex.cpp.
QgsRectangle QgsPointCloudIndex::nodeMapExtent | ( | const IndexedPointCloudNode & | node | ) | const |
Returns the extent of a node in map coordinates.
Definition at line 245 of file qgspointcloudindex.cpp.
int QgsPointCloudIndex::nodePointCount | ( | const IndexedPointCloudNode & | n | ) |
Returns the number of points of indexed point cloud node n.
Definition at line 281 of file qgspointcloudindex.cpp.
|
virtual |
Returns the number of points of a given node n.
Definition at line 196 of file qgspointcloudindex.cpp.
QgsDoubleRange QgsPointCloudIndex::nodeZRange | ( | const IndexedPointCloudNode & | node | ) | const |
Returns the z range of a node.
Definition at line 250 of file qgspointcloudindex.cpp.
QgsVector3D QgsPointCloudIndex::offset | ( | ) | const |
Returns offset.
Definition at line 266 of file qgspointcloudindex.cpp.
|
pure virtual |
Returns the original metadata map.
|
pure virtual |
Returns the number of points in the point cloud.
|
inline |
Returns root node of the index.
Definition at line 271 of file qgspointcloudindex.h.
QgsVector3D QgsPointCloudIndex::scale | ( | ) | const |
Returns scale.
Definition at line 261 of file qgspointcloudindex.cpp.
|
protected |
Sets native attributes of the data.
Definition at line 271 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 289 of file qgspointcloudindex.cpp.
int QgsPointCloudIndex::span | ( | ) | const |
Returns the number of points in one direction in a single node.
Definition at line 276 of file qgspointcloudindex.cpp.
void QgsPointCloudIndex::storeNodeDataToCache | ( | QgsPointCloudBlock * | data, |
const IndexedPointCloudNode & | 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 406 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 411 of file qgspointcloudindex.cpp.
QString QgsPointCloudIndex::subsetString | ( | ) | const |
Returns the string used to define a subset of the point cloud.
Definition at line 313 of file qgspointcloudindex.cpp.
|
inline |
Returns z max.
Definition at line 313 of file qgspointcloudindex.h.
|
inline |
Returns z min.
Definition at line 311 of file qgspointcloudindex.h.
|
protected |
Definition at line 403 of file qgspointcloudindex.h.
|
protected |
Definition at line 407 of file qgspointcloudindex.h.
|
protected |
2D extent of data
Definition at line 395 of file qgspointcloudindex.h.
|
protected |
The filter expression to be evaluated when fetching node data.
Definition at line 405 of file qgspointcloudindex.h.
|
mutableprotected |
Data hierarchy.
Definition at line 399 of file qgspointcloudindex.h.
|
mutableprotected |
Definition at line 398 of file qgspointcloudindex.h.
|
protected |
Offset of our int32 coordinates compared to CRS coords.
Definition at line 401 of file qgspointcloudindex.h.
|
protected |
Bounds of the root node's cube (in int32 coordinates)
Definition at line 402 of file qgspointcloudindex.h.
|
protected |
Scale of our int32 coordinates compared to CRS coords.
Definition at line 400 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 404 of file qgspointcloudindex.h.
|
protected |
Definition at line 408 of file qgspointcloudindex.h.
|
protected |
Vertical extent of data.
Definition at line 396 of file qgspointcloudindex.h.
|
protected |
Definition at line 396 of file qgspointcloudindex.h.
|
staticprotected |
Definition at line 410 of file qgspointcloudindex.h.
|
staticprotected |
Definition at line 409 of file qgspointcloudindex.h.