Class: QgsPointCloudLayer¶
- class qgis.core.QgsPointCloudLayer¶
Bases:
QgsMapLayer
,QgsAbstractProfileSource
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.
QgsPointCloudLayer(uri: str = ‘’, baseName: str = ‘’, providerLib: str = ‘’, options: QgsPointCloudLayer.LayerOptions = QgsPointCloudLayer.LayerOptions()) Constructor - creates a point cloud layer
Enums
Bases:
enum.IntEnum
Methods
Add error message
Returns the attributes available from the layer.
- rtype:
QgsPointCloudLayer
Updates the layer's 3D renderer's symbol to match that of the layer's 2D renderer
- param rendererContext:
- param request:
- rtype:
QgsPointCloudDataProvider
- param source:
- rtype:
QgsMapLayerElevationProperties
- param source:
- rtype:
QgsRectangle
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.- rtype:
str
Invalidates the WGS84 extent.
- rtype:
Tuple[str, bool]
Returns the total number of points available in the layer.
Read style data common to all layer types
Read custom properties from project file.
- param node:
Read style manager's configuration (if any).
- param node:
- param layerNode:
Returns the 2D renderer for the point cloud.
Sets error message
Sets the extent
Sets the extent
Sets the
providerType
(provider key)Sets the 2D
renderer
for the point cloud.Sets the string used to define a subset of the layer
Sets whether this layer's 3D renderer should be automatically updated with changes applied to the layer's 2D renderer
- param transformContext:
Sets whether layer is valid or not
Returns the object containing statistics
Returns the status of point cloud statistics calculation
Returns the string used to define a subset of the layer.
Returns whether this layer's 3D renderer should be automatically updated with changes applied to the layer's 2D renderer
Write style data common to all layer types
Write custom properties to project file.
- param node:
Write style manager's configuration (if exists).
- param node:
- param layerNode:
Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
- class LayerOptions(transformContext: QgsCoordinateTransformContext = QgsCoordinateTransformContext())¶
Bases:
sip.wrapper
Constructor for LayerOptions with optional
transformContext
.QgsPointCloudLayer.LayerOptions(QgsPointCloudLayer.LayerOptions)
- loadDefaultStyle¶
- skipCrsValidation¶
- skipIndexGeneration¶
- skipStatisticsCalculation¶
- transformContext¶
- class PointCloudStatisticsCalculationState(value)¶
Bases:
enum.IntEnum
Point cloud statistics calculation task
New in version 3.26.
NotStarted
: The statistics calculation task has not been startedCalculating
: The statistics calculation task is runningCalculated
: The statistics calculation task is done and statistics are available
- Calculated = 2¶
- Calculating = 1¶
- NotStarted = 0¶
- baseClass¶
alias of
QgsPointCloudLayer
- appendError(self, error: QgsErrorMessage)¶
Add error message
- attributes(self) QgsPointCloudAttributeCollection ¶
Returns the attributes available from the layer.
- Return type:
- childEvent(self, QChildEvent)¶
- clone(self) QgsPointCloudLayer ¶
- Return type:
- connectNotify(self, QMetaMethod)¶
- convertRenderer3DFromRenderer2D(self) bool ¶
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
New in version 3.26.
- createMapRenderer(self, rendererContext: QgsRenderContext) QgsMapLayerRenderer ¶
- Parameters:
rendererContext (QgsRenderContext) –
- Return type:
- createProfileGenerator(self, request: QgsProfileRequest) QgsAbstractProfileGenerator ¶
- Parameters:
request (QgsProfileRequest) –
- Return type:
- customEvent(self, QEvent)¶
- dataProvider(self) QgsPointCloudDataProvider ¶
- Return type:
- decodedSource(self, source: str, dataProvider: str, context: QgsReadWriteContext) str ¶
- Parameters:
source (str) –
dataProvider (str) –
context (QgsReadWriteContext) –
- Return type:
str
- disconnectNotify(self, QMetaMethod)¶
- elevationProperties(self) QgsMapLayerElevationProperties ¶
- Return type:
- encodedSource(self, source: str, context: QgsReadWriteContext) str ¶
- Parameters:
source (str) –
context (QgsReadWriteContext) –
- Return type:
str
- extent(self) QgsRectangle ¶
- Return type:
- 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
- invalidateWgs84Extent(self)¶
Invalidates the WGS84 extent. If FlagTrustLayerMetadata is enabled, the extent is not invalidated because we want to trust metadata whatever happens.
New in version 3.20.
- isSignalConnected(self, QMetaMethod) bool ¶
- loadDefaultStyle(self) Tuple[str, bool] ¶
- Return type:
Tuple[str, bool]
- pointCount(self) int ¶
Returns the total number of points available in the layer.
- Return type:
int
- raiseError¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- readCommonStyle(self, layerElement: QDomElement, context: QgsReadWriteContext, categories: QgsMapLayer.StyleCategories | QgsMapLayer.StyleCategory = QgsMapLayer.AllStyleCategories)¶
Read style data common to all layer types
- 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: QgsMapLayer.StyleCategories | QgsMapLayer.StyleCategory = QgsMapLayer.AllStyleCategories) bool ¶
- Parameters:
node (QDomNode) –
errorMessage (str) –
context (QgsReadWriteContext) –
categories (Union[QgsMapLayer.StyleCategories) –
- 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: QgsMapLayer.StyleCategories | QgsMapLayer.StyleCategory = QgsMapLayer.AllStyleCategories) bool ¶
- Parameters:
node (QDomNode) –
errorMessage (str) –
context (QgsReadWriteContext) –
categories (Union[QgsMapLayer.StyleCategories) –
- Return type:
bool
- readXml(self, layerNode: QDomNode, context: QgsReadWriteContext) bool ¶
- Parameters:
layerNode (QDomNode) –
context (QgsReadWriteContext) –
- Return type:
bool
- receivers(self, PYQT_SIGNAL) int ¶
- renderer(self) QgsPointCloudRenderer ¶
Returns the 2D renderer for the point cloud.
See also
- Return type:
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- 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
- Parameters:
renderer (QgsPointCloudRenderer) –
- setSubsetString(self, subset: str) bool ¶
Sets the string used to define a subset of the layer
- Parameters:
subset (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
New in version 3.26.
- setSync3DRendererTo2DRenderer(self, sync: bool)¶
Sets whether this layer’s 3D renderer should be automatically updated with changes applied to the layer’s 2D renderer
New in version 3.26.
- Parameters:
sync (bool) –
- setTransformContext(self, transformContext: QgsCoordinateTransformContext)¶
- Parameters:
transformContext (QgsCoordinateTransformContext) –
- setValid(self, valid: bool)¶
Sets whether layer is valid or not
- statistics(self) QgsPointCloudStatistics ¶
Returns the object containing statistics
New in version 3.26.
- Return type:
- statisticsCalculationState(self) QgsPointCloudLayer.PointCloudStatisticsCalculationState ¶
Returns the status of point cloud statistics calculation
New in version 3.26.
- statisticsCalculationStateChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- subsetString(self) str ¶
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
New in version 3.26.
- subsetStringChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- sync3DRendererTo2DRenderer(self) bool ¶
Returns whether this layer’s 3D renderer should be automatically updated with changes applied to the layer’s 2D renderer
New in version 3.26.
- Return type:
bool
- timerEvent(self, QTimerEvent)¶
- writeCommonStyle(self, layerElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext, categories: QgsMapLayer.StyleCategories | QgsMapLayer.StyleCategory = QgsMapLayer.AllStyleCategories)¶
Write style data common to all layer types
- writeCustomProperties(self, layerNode: QDomNode, doc: QDomDocument)¶
Write custom properties to project file.
- writeStyle(self, node: QDomNode, doc: QDomDocument, errorMessage: str, context: QgsReadWriteContext, categories: QgsMapLayer.StyleCategories | QgsMapLayer.StyleCategory = QgsMapLayer.AllStyleCategories) bool ¶
- Parameters:
node (QDomNode) –
doc (QDomDocument) –
errorMessage (str) –
context (QgsReadWriteContext) –
categories (Union[QgsMapLayer.StyleCategories) –
- 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: QgsMapLayer.StyleCategories | QgsMapLayer.StyleCategory = QgsMapLayer.AllStyleCategories) bool ¶
- Parameters:
node (QDomNode) –
doc (QDomDocument) –
errorMessage (str) –
context (QgsReadWriteContext) –
categories (Union[QgsMapLayer.StyleCategories) –
- Return type:
bool
- writeXml(self, layerNode: QDomNode, doc: QDomDocument, context: QgsReadWriteContext) bool ¶
- Parameters:
layerNode (QDomNode) –
doc (QDomDocument) –
context (QgsReadWriteContext) –
- Return type:
bool