Class: QgsPointCloudLayer

Represents a map layer supporting display of point clouds

Note

The API is considered EXPERIMENTAL and can be changed without a notice

Added in version 3.18.

Class Hierarchy

Inheritance diagram of qgis.core.QgsPointCloudLayer

Base classes

QgsMapLayer

Base class for all map layer types. This is the base class for all map layer types (vector, raster).

QObject

QgsAbstractProfileSource

Interface for classes which can generate elevation profiles.

Enums

PointCloudStatisticsCalculationState

Point cloud statistics calculation task

Methods

attributes

Returns the attributes available from the layer.

convertRenderer3DFromRenderer2D

Updates the layer's 3D renderer's symbol to match that of the layer's 2D renderer

pointCount

Returns the total number of points available in the layer.

renderer

Returns the 2D renderer for the point cloud.

setRenderer

Sets the 2D renderer for the point cloud.

setSubsetString

Sets the string used to define a subset of the layer

setSync3DRendererTo2DRenderer

Sets whether this layer's 3D renderer should be automatically updated with changes applied to the layer's 2D renderer

statistics

Returns the object containing statistics

statisticsCalculationState

Returns the status of point cloud statistics calculation

subsetString

Returns the string used to define a subset of the layer.

sync3DRendererTo2DRenderer

Returns whether this layer's 3D renderer should be automatically updated with changes applied to the layer's 2D renderer

Signals

raiseError

Signals an error related to this point cloud layer.

statisticsCalculationStateChanged

Emitted when statistics calculation state has changed

subsetStringChanged

Emitted when the layer's subset string has changed.

class qgis.core.QgsPointCloudLayer[source]

Bases: QgsMapLayer, QgsAbstractProfileSource

__init__(uri: str | None = '', baseName: str | None = '', providerLib: str | None = '', options: QgsPointCloudLayer.LayerOptions = QgsPointCloudLayer.LayerOptions())

Constructor - creates a point cloud layer

Parameters:
  • uri (Optional[str] = '')

  • baseName (Optional[str] = '')

  • providerLib (Optional[str] = '')

  • options (QgsPointCloudLayer.LayerOptions = QgsPointCloudLayer.LayerOptions())

class LayerOptions

Bases: object

Setting options for loading point cloud layers.

skipCrsValidation

Controls whether the layer is allowed to have an invalid/unknown CRS.

If True, then no validation will be performed on the layer’s CRS and the layer layer’s crs() may be invalid() (i.e. the layer will have no georeferencing available and will be treated as having purely numerical coordinates).

If False (the default), the layer’s CRS will be validated using QgsCoordinateReferenceSystem.validate(), which may cause a blocking, user-facing dialog asking users to manually select the correct CRS for the layer.

skipIndexGeneration

Set to True if point cloud index generation should be skipped.

skipStatisticsCalculation

Set to true if the statistics calculation for this point cloud is disabled

Added in version 3.26.

class PointCloudStatisticsCalculationState(*values)

Bases: IntEnum

Point cloud statistics calculation task

Added in version 3.26.

  • NotStarted: The statistics calculation task has not been started

  • Calculating: The statistics calculation task is running

  • Calculated: The statistics calculation task is done and statistics are available

Calculated = 2
Calculating = 1
NotStarted = 0
attributes(self) QgsPointCloudAttributeCollection[source]

Returns the attributes available from the layer.

Return type:

QgsPointCloudAttributeCollection

convertRenderer3DFromRenderer2D(self) bool[source]

Updates the layer’s 3D renderer’s symbol to match that of the layer’s 2D renderer

Return type:

bool

Returns:

True on success, False otherwise

Added in version 3.26.

pointCount(self) int[source]

Returns the total number of points available in the layer.

Return type:

int

signal raiseError(msg: str)[source]

Signals an error related to this point cloud layer.

Added in version 3.26.

Parameters:

msg (str)

renderer(self) QgsPointCloudRenderer | None[source]

Returns the 2D renderer for the point cloud.

See also

setRenderer()

Return type:

Optional[QgsPointCloudRenderer]

setRenderer(self, renderer: QgsPointCloudRenderer | None)[source]

Sets the 2D renderer for the point cloud.

Ownership of renderer is transferred to the layer.

See also

renderer()

Parameters:

renderer (Optional[QgsPointCloudRenderer])

setSubsetString(self, subset: str | None) bool[source]

Sets the string used to define a subset of the layer

Parameters:

subset (Optional[str]) – The subset string to be used in a :py:class:`QgsPointCloudExpression`

Return type:

bool

Returns:

True, when setting the subset string was successful, False otherwise

Added in version 3.26.

setSync3DRendererTo2DRenderer(self, sync: bool)[source]

Sets whether this layer’s 3D renderer should be automatically updated with changes applied to the layer’s 2D renderer

Added in version 3.26.

Parameters:

sync (bool)

statistics(self) QgsPointCloudStatistics[source]

Returns the object containing statistics

Added in version 3.26.

Return type:

QgsPointCloudStatistics

statisticsCalculationState(self) QgsPointCloudLayer.PointCloudStatisticsCalculationState[source]

Returns the status of point cloud statistics calculation

Added in version 3.26.

Return type:

QgsPointCloudLayer.PointCloudStatisticsCalculationState

signal statisticsCalculationStateChanged(state: QgsPointCloudLayer.PointCloudStatisticsCalculationState)[source]

Emitted when statistics calculation state has changed

Added in version 3.26.

Parameters:

state (QgsPointCloudLayer.PointCloudStatisticsCalculationState)

subsetString(self) str[source]

Returns the string used to define a subset of the layer.

Return type:

str

Returns:

The subset string or null QString if not implemented by the provider

Added in version 3.26.

signal subsetStringChanged[source]

Emitted when the layer’s subset string has changed.

Added in version 3.26.

sync3DRendererTo2DRenderer(self) bool[source]

Returns whether this layer’s 3D renderer should be automatically updated with changes applied to the layer’s 2D renderer

Added in version 3.26.

Return type:

bool