QGIS API Documentation 3.41.0-Master (d2aaa9c6e02)
|
The QgsPointCloudEditingIndex class is a QgsPointCloudIndex that is used as an editing buffer when editing point cloud data. More...
#include <qgspointcloudeditingindex.h>
Public Member Functions | |
QgsPointCloudEditingIndex (QgsPointCloudLayer *layer) | |
Ctor. | |
Qgis::PointCloudAccessType | accessType () const override |
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) override |
Returns a handle responsible for loading a node data block. | |
std::unique_ptr< QgsAbstractPointCloudIndex > | clone () const override |
Returns a clone of the current point cloud index object. | |
bool | commitChanges (QString *errorMessage=nullptr) |
Tries to store pending changes to the data provider. | |
QgsCoordinateReferenceSystem | crs () const override |
Returns the coordinate reference system of the point cloud index. | |
QgsPointCloudNode | getNode (const QgsPointCloudNodeId &id) const override |
Returns object for a given node. | |
bool | hasNode (const QgsPointCloudNodeId &n) const override |
Returns whether the octree contain given node. | |
bool | isModified () const |
Returns true if there are uncommitted changes, false otherwise. | |
bool | isValid () const override |
Returns whether index is loaded and valid. | |
void | load (const QString &fileName) override |
Loads the index from the file. | |
std::unique_ptr< QgsPointCloudBlock > | nodeData (const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request) override |
Returns node data block. | |
QVariantMap | originalMetadata () const override |
Returns the original metadata map. | |
qint64 | pointCount () const override |
Returns the number of points in the point cloud. | |
bool | updateNodeData (const QHash< QgsPointCloudNodeId, QByteArray > &data) override |
Tries to update the data for the specified nodes. | |
Public Member Functions inherited from QgsAbstractPointCloudIndex | |
QgsAbstractPointCloudIndex () | |
Constructs index. | |
virtual | ~QgsAbstractPointCloudIndex () |
QgsPointCloudAttributeCollection | attributes () const |
Returns all attributes that are stored in the file. | |
void | copyCommonProperties (QgsAbstractPointCloudIndex *destination) const |
Copies common properties to the destination 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. | |
QgsPointCloudBlock * | getNodeDataFromCache (const QgsPointCloudNodeId &node, const QgsPointCloudRequest &request) |
Fetches the requested node data from the cache for the specified node and request. | |
virtual QgsPointCloudStatistics | metadataStatistics () const |
Returns the object containing the statistics metadata extracted from the dataset. | |
QgsVector3D | offset () const |
Returns offset of data from CRS. | |
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) const |
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. | |
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. | |
Friends | |
class | QgsPointCloudLayerEditUtils |
Additional Inherited Members | |
Static Public Member Functions inherited from QgsAbstractPointCloudIndex | |
static void | storeNodeDataToCacheStatic (QgsPointCloudBlock *data, const 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 inherited from QgsAbstractPointCloudIndex | |
void | setAttributes (const QgsPointCloudAttributeCollection &attributes) |
Sets native attributes of the data. | |
Protected Attributes inherited from QgsAbstractPointCloudIndex | |
QgsPointCloudAttributeCollection | mAttributes |
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 inherited from QgsAbstractPointCloudIndex | |
static QCache< QgsPointCloudCacheKey, QgsPointCloudBlock > | sBlockCache |
static QMutex | sBlockCacheMutex |
The QgsPointCloudEditingIndex class is a QgsPointCloudIndex that is used as an editing buffer when editing point cloud data.
Definition at line 36 of file qgspointcloudeditingindex.h.
|
explicit |
Ctor.
Definition at line 28 of file qgspointcloudeditingindex.cpp.
|
overridevirtual |
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 )
Implements QgsAbstractPointCloudIndex.
Definition at line 65 of file qgspointcloudeditingindex.cpp.
|
overridevirtual |
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
Implements QgsAbstractPointCloudIndex.
Definition at line 122 of file qgspointcloudeditingindex.cpp.
|
overridevirtual |
Returns a clone of the current point cloud index object.
Implements QgsAbstractPointCloudIndex.
Definition at line 50 of file qgspointcloudeditingindex.cpp.
bool QgsPointCloudEditingIndex::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 128 of file qgspointcloudeditingindex.cpp.
|
overridevirtual |
Returns the coordinate reference system of the point cloud index.
Implements QgsAbstractPointCloudIndex.
Definition at line 70 of file qgspointcloudeditingindex.cpp.
|
overridevirtual |
Returns object for a given node.
Reimplemented from QgsAbstractPointCloudIndex.
Definition at line 90 of file qgspointcloudeditingindex.cpp.
|
overridevirtual |
Returns whether the octree contain given node.
Reimplemented from QgsAbstractPointCloudIndex.
Definition at line 85 of file qgspointcloudeditingindex.cpp.
bool QgsPointCloudEditingIndex::isModified | ( | ) | const |
Returns true
if there are uncommitted changes, false
otherwise.
Definition at line 188 of file qgspointcloudeditingindex.cpp.
|
overridevirtual |
Returns whether index is loaded and valid.
Implements QgsAbstractPointCloudIndex.
Definition at line 60 of file qgspointcloudeditingindex.cpp.
|
overridevirtual |
Loads the index from the file.
Implements QgsAbstractPointCloudIndex.
Definition at line 55 of file qgspointcloudeditingindex.cpp.
|
overridevirtual |
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
Implements QgsAbstractPointCloudIndex.
Definition at line 95 of file qgspointcloudeditingindex.cpp.
|
overridevirtual |
Returns the original metadata map.
Implements QgsAbstractPointCloudIndex.
Definition at line 80 of file qgspointcloudeditingindex.cpp.
|
overridevirtual |
Returns the number of points in the point cloud.
Implements QgsAbstractPointCloudIndex.
Definition at line 75 of file qgspointcloudeditingindex.cpp.
|
overridevirtual |
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 from QgsAbstractPointCloudIndex.
Definition at line 193 of file qgspointcloudeditingindex.cpp.
|
friend |
Definition at line 75 of file qgspointcloudeditingindex.h.