16#ifndef QGSPOINTCLOUDEDITINGINDEX_H
17#define QGSPOINTCLOUDEDITINGINDEX_H
41 void load(
const QString &fileName,
const QString &authcfg = QString() )
override;
57 bool updateNodeData(
const QHash<QgsPointCloudNodeId, QByteArray> &data )
override;
88 bool mIsValid =
false;
89 QHash<QgsPointCloudNodeId, QByteArray> mEditedNodeData;
90 mutable QMutex mEditedNodeDataMutex;
PointCloudAccessType
The access type of the data, local is for local files and remote for remote files (over HTTP).
virtual QVariantMap originalMetadata() const =0
Returns the original metadata map.
virtual qint64 pointCount() const =0
Returns the number of points in the point cloud.
virtual QgsCoordinateReferenceSystem crs() const =0
Returns the coordinate reference system of the point cloud index.
virtual bool hasNode(const QgsPointCloudNodeId &n) const
Returns whether the octree contain given node.
virtual QgsPointCloudBlockRequest * asyncNodeData(const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request)=0
Returns a handle responsible for loading a node data block.
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 s...
virtual bool updateNodeData(const QHash< QgsPointCloudNodeId, QByteArray > &data)
Tries to update the data for the specified nodes.
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 std::unique_ptr< QgsPointCloudBlock > nodeData(const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request)=0
Returns node data block.
QgsAbstractPointCloudIndex()
Constructs index.
virtual bool isValid() const =0
Returns whether index is loaded and valid.
virtual QgsPointCloudNode getNode(const QgsPointCloudNodeId &id) const
Returns object for a given node.
virtual bool setSubsetString(const QString &subset)
Sets the string used to define a subset of the point cloud.
virtual QString subsetString() const
Returns the string used to define a subset of the point cloud.
Represents a coordinate reference system (CRS).
Base class for handling loading QgsPointCloudBlock asynchronously.
QList< QgsPointCloudNodeId > updatedNodes() const
Returns a list of node IDs that have been modified.
bool isModified() const
Returns true if there are uncommitted changes, false otherwise.
QgsPointCloudIndex backingIndex() const
Returns index for the underlying non-edited data.
bool commitChanges(QString *errorMessage=nullptr)
Tries to store pending changes to the data provider.
void resetNodeEdits(QgsPointCloudNodeId n)
Removes node edits from index, returning it to its original state.
const QByteArray rawEditedNodeData(QgsPointCloudNodeId n) const
Returns the raw, encoded, compressed data for a node or empty if missing.
QgsPointCloudEditingIndex(QgsPointCloudLayer *layer)
Ctor.
bool isNodeModified(QgsPointCloudNodeId n) const
Returns true if this node was modified.
friend class QgsPointCloudLayerEditUtils
Smart pointer for QgsAbstractPointCloudIndex.
Represents a map layer supporting display of point clouds.
Represents an indexed point cloud node's position in octree.
Keeps metadata for an indexed point cloud node.
Point cloud data request.