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
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 ) |
|
Returns all attributes that are stored in the file |
|
Tries to store pending changes to the data provider. |
|
Returns the coordinate reference system of the point cloud index |
|
Returns the error that occurred during the loading of the index. |
|
Returns extent of the data |
|
Returns extra metadata that's not accessible through the other methods in an implementation-specific dynamic structure. |
|
Returns object for a given node |
|
Returns whether the octree contain given node |
|
Returns |
|
Returns whether index is loaded and valid |
|
Loads the index from the file |
|
Returns the object containing the statistics metadata extracted from the dataset |
|
Returns offset of data from CRS |
|
Returns the original metadata map |
|
Returns the number of points in the point cloud |
|
Returns root node of the index |
|
Returns bounding box of root node in CRS coords |
|
Returns scale of data relative to CRS |
|
Sets the string used to define a subset of the point cloud. |
|
Returns the number of points in one direction in a single node. |
|
Returns the string used to define a subset of the point cloud. |
|
Tries to update the data for the specified nodes. |
|
Returns a list of node IDs that have been modified |
|
Writes the statistics object stats into the backing file, if possible. |
|
Returns z max |
|
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:
- 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:
True
on 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
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:
- 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:
True
on 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:
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