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.

Methods

accessType

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 )

attributes

Returns all attributes that are stored in the file

commitChanges

Tries to store pending changes to the data provider.

crs

Returns the coordinate reference system of the point cloud index

error

Returns the error that occurred during the loading of the index.

extent

Returns extent of the data

extraMetadata

Returns extra metadata that's not accessible through the other methods in an implementation-specific dynamic structure.

getNode

Returns object for a given node

hasNode

Returns whether the octree contain given node

isModified

Returns True if there are uncommitted changes, False otherwise

isValid

Returns whether index is loaded and valid

load

Loads the index from the file

metadataStatistics

Returns the object containing the statistics metadata extracted from the dataset

offset

Returns offset of data from CRS

originalMetadata

Returns the original metadata map

pointCount

Returns the number of points in the point cloud

root

Returns root node of the index

rootNodeBounds

Returns bounding box of root node in CRS coords

scale

Returns scale of data relative to CRS

setSubsetString

Sets the string used to define a subset of the point cloud.

span

Returns the number of points in one direction in a single node.

subsetString

Returns the string used to define a subset of the point cloud.

updateNodeData

Tries to update the data for the specified nodes.

updatedNodes

Returns a list of node IDs that have been modified

writeStatistics

Writes the statistics object stats into the backing file, if possible.

zMax

Returns z max

zMin

Returns z min

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:

Qgis.PointCloudAccessType

attributes(self) QgsPointCloudAttributeCollection[source]

Returns all attributes that are stored in the file

See also

QgsAbstractPointCloudIndex.attributes()

Return type:

QgsPointCloudAttributeCollection

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:

True on success, otherwise False

crs(self) QgsCoordinateReferenceSystem[source]

Returns the coordinate reference system of the point cloud index

See also

QgsAbstractPointCloudIndex.crs()

Return type:

QgsCoordinateReferenceSystem

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:

QgsRectangle

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:

QgsPointCloudNode

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 True if there are uncommitted changes, False otherwise

Return type:

bool

isValid(self) bool[source]

Returns whether index is loaded and valid

See also

QgsAbstractPointCloudIndex.isValid()

Return type:

bool

load(self, fileName: str | None)[source]

Loads the index from the file

See also

QgsAbstractPointCloudIndex.load()

Parameters:

fileName (Optional[str])

metadataStatistics(self) QgsPointCloudStatistics[source]

Returns the object containing the statistics metadata extracted from the dataset

See also

QgsAbstractPointCloudIndex.metadataStatistics()

Return type:

QgsPointCloudStatistics

offset(self) QgsVector3D[source]

Returns offset of data from CRS

See also

QgsAbstractPointCloudIndex.offset()

Return type:

QgsVector3D

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:

QgsPointCloudNodeId

rootNodeBounds(self) QgsBox3D[source]

Returns bounding box of root node in CRS coords

See also

QgsAbstractPointCloudIndex.rootNodeBounds()

Return type:

QgsBox3D

scale(self) QgsVector3D[source]

Returns scale of data relative to CRS

See also

QgsAbstractPointCloudIndex.scale()

Return type:

QgsVector3D

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:

True on success, otherwise False

Parameters:

data (Dict[QgsPointCloudNodeId, Union[QByteArray, bytes, bytearray]])

updatedNodes(self) List[QgsPointCloudNodeId]

Returns a list of node IDs that have been modified

Return type:

List[QgsPointCloudNodeId]

writeStatistics(self, stats: QgsPointCloudStatistics) bool[source]

Writes the statistics object stats into the backing file, if possible. Returns true if the data was written successfully.

See also

QgsAbstractPointCloudIndex.writeStatistics()

Parameters:

stats (QgsPointCloudStatistics)

Return type:

bool

zMax(self) float[source]

Returns z max

See also

QgsAbstractPointCloudIndex.zMax()

Return type:

float

zMin(self) float[source]

Returns z min

See also

QgsAbstractPointCloudIndex.zMin()

Return type:

float