QGIS API Documentation 3.41.0-Master (d2aaa9c6e02)
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
QgsPointCloudEditingIndex Class Reference

The QgsPointCloudEditingIndex class is a QgsPointCloudIndex that is used as an editing buffer when editing point cloud data. More...

#include <qgspointcloudeditingindex.h>

Inheritance diagram for QgsPointCloudEditingIndex:
Inheritance graph
[legend]

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 )
 
QgsPointCloudBlockRequestasyncNodeData (const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request) override
 Returns a handle responsible for loading a node data block.
 
std::unique_ptr< QgsAbstractPointCloudIndexclone () 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< QgsPointCloudBlocknodeData (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.
 
QgsPointCloudBlockgetNodeDataFromCache (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, QgsPointCloudBlocksBlockCache
 
static QMutex sBlockCacheMutex
 

Detailed Description

The QgsPointCloudEditingIndex class is a QgsPointCloudIndex that is used as an editing buffer when editing point cloud data.

Note
Not available in Python bindings
Since
QGIS 3.42

Definition at line 36 of file qgspointcloudeditingindex.h.

Constructor & Destructor Documentation

◆ QgsPointCloudEditingIndex()

QgsPointCloudEditingIndex::QgsPointCloudEditingIndex ( QgsPointCloudLayer layer)
explicit

Ctor.

Definition at line 28 of file qgspointcloudeditingindex.cpp.

Member Function Documentation

◆ accessType()

Qgis::PointCloudAccessType QgsPointCloudEditingIndex::accessType ( ) const
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 )

Note
Always make sure to check before trying to use asyncNodeData since it is not supported in the case of local access type

Implements QgsAbstractPointCloudIndex.

Definition at line 65 of file qgspointcloudeditingindex.cpp.

◆ asyncNodeData()

QgsPointCloudBlockRequest * QgsPointCloudEditingIndex::asyncNodeData ( const QgsPointCloudNodeId n,
const QgsPointCloudRequest request 
)
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.

◆ clone()

std::unique_ptr< QgsAbstractPointCloudIndex > QgsPointCloudEditingIndex::clone ( ) const
overridevirtual

Returns a clone of the current point cloud index object.

Note
It is the responsibility of the caller to handle the ownership and delete the object.
Since
QGIS 3.26

Implements QgsAbstractPointCloudIndex.

Definition at line 50 of file qgspointcloudeditingindex.cpp.

◆ commitChanges()

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.

Returns
true on success, otherwise false

Definition at line 128 of file qgspointcloudeditingindex.cpp.

◆ crs()

QgsCoordinateReferenceSystem QgsPointCloudEditingIndex::crs ( ) const
overridevirtual

Returns the coordinate reference system of the point cloud index.

Implements QgsAbstractPointCloudIndex.

Definition at line 70 of file qgspointcloudeditingindex.cpp.

◆ getNode()

QgsPointCloudNode QgsPointCloudEditingIndex::getNode ( const QgsPointCloudNodeId id) const
overridevirtual

Returns object for a given node.

Reimplemented from QgsAbstractPointCloudIndex.

Definition at line 90 of file qgspointcloudeditingindex.cpp.

◆ hasNode()

bool QgsPointCloudEditingIndex::hasNode ( const QgsPointCloudNodeId n) const
overridevirtual

Returns whether the octree contain given node.

Reimplemented from QgsAbstractPointCloudIndex.

Definition at line 85 of file qgspointcloudeditingindex.cpp.

◆ isModified()

bool QgsPointCloudEditingIndex::isModified ( ) const

Returns true if there are uncommitted changes, false otherwise.

Definition at line 188 of file qgspointcloudeditingindex.cpp.

◆ isValid()

bool QgsPointCloudEditingIndex::isValid ( ) const
overridevirtual

Returns whether index is loaded and valid.

Implements QgsAbstractPointCloudIndex.

Definition at line 60 of file qgspointcloudeditingindex.cpp.

◆ load()

void QgsPointCloudEditingIndex::load ( const QString &  fileName)
overridevirtual

Loads the index from the file.

Implements QgsAbstractPointCloudIndex.

Definition at line 55 of file qgspointcloudeditingindex.cpp.

◆ nodeData()

std::unique_ptr< QgsPointCloudBlock > QgsPointCloudEditingIndex::nodeData ( const QgsPointCloudNodeId n,
const QgsPointCloudRequest request 
)
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.

◆ originalMetadata()

QVariantMap QgsPointCloudEditingIndex::originalMetadata ( ) const
overridevirtual

Returns the original metadata map.

Implements QgsAbstractPointCloudIndex.

Definition at line 80 of file qgspointcloudeditingindex.cpp.

◆ pointCount()

qint64 QgsPointCloudEditingIndex::pointCount ( ) const
overridevirtual

Returns the number of points in the point cloud.

Implements QgsAbstractPointCloudIndex.

Definition at line 75 of file qgspointcloudeditingindex.cpp.

◆ updateNodeData()

bool QgsPointCloudEditingIndex::updateNodeData ( const QHash< QgsPointCloudNodeId, QByteArray > &  data)
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.

Returns
true on success, otherwise false
Since
QGIS 3.42

Reimplemented from QgsAbstractPointCloudIndex.

Definition at line 193 of file qgspointcloudeditingindex.cpp.

Friends And Related Symbol Documentation

◆ QgsPointCloudLayerEditUtils

friend class QgsPointCloudLayerEditUtils
friend

Definition at line 75 of file qgspointcloudeditingindex.h.


The documentation for this class was generated from the following files: