Class: QgsPointCloudIndex¶
Smart pointer for QgsAbstractPointCloudIndex.
This is a wrapper for QgsAbstractPointCloudIndex, an index
for point cloud layers. It contains a shared_pointer, ensuring that
concurrent access to the index is memory safe.
- class qgis.core.QgsPointCloudIndex[source]¶
Bases:
object- accessType(self) Qgis.PointCloudAccessType[source]¶
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
See also
QgsAbstractPointCloudIndex.accessType()- Return type:
- attributes(self) QgsPointCloudAttributeCollection[source]¶
Returns all attributes that are stored in the file
See also
QgsAbstractPointCloudIndex.attributes()- Return type:
- commitChanges(self)[source]¶
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:
Trueon success, otherwiseFalse
- crs(self) QgsCoordinateReferenceSystem[source]¶
Returns the coordinate reference system of the point cloud index
See also
QgsAbstractPointCloudIndex.crs()- Return type:
- error(self) str[source]¶
Returns the error that occurred during the loading of the index.
See also
QgsAbstractPointCloudIndex.error()- Return type:
str
- extent(self) QgsRectangle[source]¶
Returns extent of the data
See also
QgsAbstractPointCloudIndex.extent()- Return type:
- extraMetadata(self) Dict[str, Any][source]¶
Returns extra metadata that’s not accessible through the other methods in an implementation-specific dynamic structure.
See also
QgsAbstractPointCloudIndex.extraMetadata()- Return type:
Dict[str, Any]
- getNode(self, id: QgsPointCloudNodeId) QgsPointCloudNode[source]¶
Returns object for a given node
See also
QgsAbstractPointCloudIndex.getNode()- Parameters:
id (QgsPointCloudNodeId)
- Return type:
- hasNode(self, id: QgsPointCloudNodeId) bool[source]¶
Returns whether the octree contain given node
See also
QgsAbstractPointCloudIndex.hasNode()- Parameters:
id (QgsPointCloudNodeId)
- Return type:
bool
- isModified(self) bool[source]¶
Returns
Trueif there are uncommitted changes,Falseotherwise- Return type:
bool
- isValid(self) bool[source]¶
Returns whether index is loaded and valid
See also
QgsAbstractPointCloudIndex.isValid()- Return type:
bool
- load(self, url: str | None, authcfg: str | None = '')[source]¶
Loads the index from a
url- Parameters:
url (Optional[str]) – The URL to load the index from. Can be a local file or an http(s) URL.
authcfg (Optional[str] = '') – Optionally apply this authentication configuration for network requests (since QGIS 4.0)
See also
QgsAbstractPointCloudIndex.load()
- metadataStatistics(self) QgsPointCloudStatistics[source]¶
Returns the object containing the statistics metadata extracted from the dataset
See also
QgsAbstractPointCloudIndex.metadataStatistics()- Return type:
- offset(self) QgsVector3D[source]¶
Returns offset of data from CRS
See also
QgsAbstractPointCloudIndex.offset()- Return type:
- originalMetadata(self) Dict[str, Any][source]¶
Returns the original metadata map
See also
QgsAbstractPointCloudIndex.originalMetadata()- Return type:
Dict[str, Any]
- pointCount(self) int[source]¶
Returns the number of points in the point cloud
See also
QgsAbstractPointCloudIndex.pointCount()- Return type:
int
- root(self) QgsPointCloudNodeId[source]¶
Returns root node of the index
See also
QgsAbstractPointCloudIndex.root()- Return type:
- rootNodeBounds(self) QgsBox3D[source]¶
Returns bounding box of root node in CRS coords
See also
QgsAbstractPointCloudIndex.rootNodeBounds()- Return type:
- scale(self) QgsVector3D[source]¶
Returns scale of data relative to CRS
See also
QgsAbstractPointCloudIndex.scale()- Return type:
- setSubsetString(self, subset: str | None) bool[source]¶
Sets the string used to define a subset of the point cloud.
- Parameters:
subset (Optional[str]) – The subset string to be used in a
:py:class:`QgsPointCloudExpression`- Return type:
bool
- Returns:
true if the expression is parsed with no errors, false otherwise
See also
QgsAbstractPointCloudIndex.setSubsetString()
- span(self) int[source]¶
Returns the number of points in one direction in a single node.
See also
QgsAbstractPointCloudIndex.span()- Return type:
int
- subsetString(self) str[source]¶
Returns the string used to define a subset of the point cloud.
- Return type:
str
- Returns:
The subset string or empty string if not implemented by the provider
See also
QgsAbstractPointCloudIndex.subsetString()
- updateNodeData(self, data: Dict[QgsPointCloudNodeId, QByteArray | bytes | bytearray]) bool[source]¶
Tries to update the data for the specified nodes.
- Return type:
bool
- Returns:
Trueon success, otherwiseFalse- Parameters:
data (Dict[
QgsPointCloudNodeId, Union[QByteArray, bytes, bytearray]])
- updatedNodes(self) List[QgsPointCloudNodeId]¶
Returns a list of node IDs that have been modified
- Return type:
- writeStatistics(self, stats: QgsPointCloudStatistics) bool[source]¶
Writes the statistics object
statsinto the backing file, if possible. Returns true if the data was written successfully.See also
QgsAbstractPointCloudIndex.writeStatistics()- Parameters:
stats (QgsPointCloudStatistics)
- Return type:
bool