Class: QgsPointCloudLayer

class qgis.core.QgsPointCloudLayer(path: str = '', baseName: str = '', providerLib: str = '', options: QgsPointCloudLayer.LayerOptions = QgsPointCloudLayer.LayerOptions())

Bases: QgsMapLayer

Constructor - creates a point cloud layer

Represents a map layer supporting display of point clouds

Note

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

New in version 3.18.

Parameters
  • path (str = '') –

  • baseName (str = '') –

  • providerLib (str = '') –

  • options

class LayerOptions(transformContext: QgsCoordinateTransformContext = QgsCoordinateTransformContext())

Bases: sip.wrapper

Constructor for LayerOptions with optional transformContext.

QgsPointCloudLayer.LayerOptions(QgsPointCloudLayer.LayerOptions)

Parameters

transformContext (QgsCoordinateTransformContext = QgsCoordinateTransformContext()) –

loadDefaultStyle
skipCrsValidation
transformContext
appendError(self, error: QgsErrorMessage)

Add error message

attributes(self)QgsPointCloudAttributeCollection

Returns the attributes available from the layer.

Return type

QgsPointCloudAttributeCollection

childEvent(self, QChildEvent)
clone(self)QgsPointCloudLayer
Return type

QgsPointCloudLayer

connectNotify(self, QMetaMethod)
createMapRenderer(self, rendererContext: QgsRenderContext)QgsMapLayerRenderer
Parameters

rendererContext (QgsRenderContext) –

Return type

QgsMapLayerRenderer

customEvent(self, QEvent)
dataProvider(self)QgsPointCloudDataProvider
Return type

QgsPointCloudDataProvider

decodedSource(self, source: str, dataProvider: str, context: QgsReadWriteContext) → str

Called by readLayerXML(), used by derived classes to decode provider’s specific data source from project files. Typically resolving absolute or relative paths, usernames and passwords or drivers prefixes (“HDF5:”)

Parameters
  • source – data source to decode, typically read from layer’s DOM element “datasource”

  • dataProvider – string identification of data provider (e.g. “ogr”), typically read from layer’s DOM element

  • context – reading context (e.g. for conversion between relative and absolute paths)

Returns

decoded source, typically to be used as the layer’s datasource

New in version 3.2.

disconnectNotify(self, QMetaMethod)
elevationProperties(self)QgsMapLayerElevationProperties
Return type

QgsMapLayerElevationProperties

encodedSource(self, source: str, context: QgsReadWriteContext) → str

Called by writeLayerXML(), used by derived classes to encode provider’s specific data source to project files. Typically resolving absolute or relative paths, usernames and passwords or drivers prefixes (“HDF5:”)

Parameters
  • source – data source to encode, typically QgsMapLayer.source()

  • context – writing context (e.g. for conversion between relative and absolute paths)

Returns

encoded source, typically to be written in the DOM element “datasource”

New in version 3.2.

extent(self)QgsRectangle
Return type

QgsRectangle

hasDependencyCycle(self, Iterable[QgsMapLayerDependency]) → bool

Checks whether a new set of dependencies will introduce a cycle this method is now deprecated and always return False, because circular dependencies are now correctly managed.

Deprecated since version QGIS: 3.10

htmlMetadata(self) → str
Return type

str

isSignalConnected(self, QMetaMethod) → bool
loadDefaultStyle(self) → Tuple[str, bool]
Return type

Tuple[str, bool]

readCommonStyle(self, layerElement: QDomElement, context: QgsReadWriteContext, categories: Union[QgsMapLayer.StyleCategories, QgsMapLayer.StyleCategory] = QgsMapLayer.AllStyleCategories)

Read style data common to all layer types

New in version 3.0.

readCustomProperties(self, layerNode: QDomNode, keyStartsWith: str = '')

Read custom properties from project file.

Parameters
  • layerNode – note to read from

  • keyStartsWith – reads only properties starting with the specified string (or all if the string is empty)

readStyle(self, node: QDomNode, errorMessage: str, context: QgsReadWriteContext, categories: Union[QgsMapLayer.StyleCategories, QgsMapLayer.StyleCategory] = QgsMapLayer.AllStyleCategories) → bool
Parameters
Return type

bool

readStyleManager(self, layerNode: QDomNode)

Read style manager’s configuration (if any). To be called by subclasses.

readSymbology(self, node: QDomNode, errorMessage: str, context: QgsReadWriteContext, categories: Union[QgsMapLayer.StyleCategories, QgsMapLayer.StyleCategory] = QgsMapLayer.AllStyleCategories) → bool
Parameters
Return type

bool

readXml(self, layerNode: QDomNode, context: QgsReadWriteContext) → bool
Parameters
Return type

bool

receivers(self, PYQT_SIGNAL) → int
renderer(self)QgsPointCloudRenderer

Returns the 2D renderer for the point cloud.

See also

setRenderer()

Return type

QgsPointCloudRenderer

sender(self) → QObject
senderSignalIndex(self) → int
setDataSource(self, dataSource: str, baseName: str, provider: str, options: QgsDataProvider.ProviderOptions, loadDefaultStyleFlag: bool = False)
Parameters
setError(self, error: QgsError)

Sets error message

setExtent(self, rect: QgsRectangle)

Sets the extent

setProviderType(self, providerType: str)

Sets the providerType (provider key)

setRenderer(self, renderer: QgsPointCloudRenderer)

Sets the 2D renderer for the point cloud.

Ownership of renderer is transferred to the layer.

See also

renderer()

Parameters

renderer (QgsPointCloudRenderer) –

setTransformContext(self, transformContext: QgsCoordinateTransformContext)
Parameters

transformContext (QgsCoordinateTransformContext) –

setValid(self, valid: bool)

Sets whether layer is valid or not

timerEvent(self, QTimerEvent)
writeCommonStyle(self, layerElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext, categories: Union[QgsMapLayer.StyleCategories, QgsMapLayer.StyleCategory] = QgsMapLayer.AllStyleCategories)

Write style data common to all layer types

New in version 3.0.

writeCustomProperties(self, layerNode: QDomNode, doc: QDomDocument)

Write custom properties to project file.

writeStyle(self, node: QDomNode, doc: QDomDocument, errorMessage: str, context: QgsReadWriteContext, categories: Union[QgsMapLayer.StyleCategories, QgsMapLayer.StyleCategory] = QgsMapLayer.AllStyleCategories) → bool
Parameters
Return type

bool

writeStyleManager(self, layerNode: QDomNode, doc: QDomDocument)

Write style manager’s configuration (if exists). To be called by subclasses.

writeSymbology(self, node: QDomNode, doc: QDomDocument, errorMessage: str, context: QgsReadWriteContext, categories: Union[QgsMapLayer.StyleCategories, QgsMapLayer.StyleCategory] = QgsMapLayer.AllStyleCategories) → bool
Parameters
Return type

bool

writeXml(self, layerNode: QDomNode, doc: QDomDocument, context: QgsReadWriteContext) → bool
Parameters
Return type

bool