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¶
Base classes¶
Base class for all map layer types. |
|
Interface for classes which can generate elevation profiles. |
- 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:
objectSetting options for loading point cloud layers.
- skipCrsValidation: bool¶
- skipIndexGeneration: bool¶
- skipStatisticsCalculation: bool¶
- class PointCloudStatisticsCalculationState(*values)¶
Bases:
IntEnumPoint cloud statistics calculation task
Added 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¶
- attributes(self) QgsPointCloudAttributeCollection[source]¶
Returns the attributes available from the layer.
- Return type:
- signal chunkAttributeValuesChanged[source]¶
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.
- commitChanges(self, stopEditing: bool = True) bool[source]¶
Attempts to commit to the underlying data provider any buffered changes made since the last to call to
startEditing().Returns the result of the attempt. If a commit fails (i.e.
Falseis returned), the in-memory changes are left untouched and are not discarded. This allows editing to continue if the commit failed on e.g. a disallowed value for an attribute - the user can re-edit and try again.If the commit failed, an error message may returned by
commitError().By setting
stopEditingtoFalse, the layer will stay in editing mode. Otherwise the layer editing mode will be disabled if the commit is successful.See also
See also
See also
Added in version 3.42.
- Parameters:
stopEditing (bool = True)
- Return type:
bool
- commitError(self) str[source]¶
Returns the last error message generated when attempting to commit changes to the layer.
See also
Added in version 3.42.
- Return type:
str
- 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:
Trueon success,Falseotherwise
Added in version 3.26.
- index(self) QgsPointCloudIndex[source]¶
Returns the point cloud index associated with the layer. If the layer is editable, its
QgsPointCloudEditingIndexis returned, otherwise the index is fetched from the data provider.Added in version 3.42.
- Return type:
- pointCount(self) int[source]¶
Returns the total number of points available in the layer.
- Return type:
int
- signal raiseError[source]¶
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.
- renderer(self) QgsPointCloudRenderer | None[source]¶
Returns the 2D renderer for the point cloud.
See also
- Return type:
Optional[QgsPointCloudRenderer]
- rollBack(self) bool[source]¶
Stops a current editing operation and discards any uncommitted edits.
See also
See also
Added in version 3.42.
- Return type:
bool
- setRenderer(self, renderer: QgsPointCloudRenderer | None)[source]¶
Sets the 2D
rendererfor the point cloud.Ownership of
rendereris transferred to the layer.See also
- 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,Falseotherwise
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)
- startEditing(self) bool[source]¶
Makes the layer editable.
This starts an edit session on this layer. Changes made in this edit session will not be made persistent until
commitChanges()is called, and can be reverted by callingrollBack().- Return type:
bool
- Returns:
Trueif the layer was successfully made editable, orFalseif the operation failed (e.g. due to an underlying read-only data source, or lack of edit support by the backend data provider).
See also
See also
Added in version 3.42.
- statistics(self) QgsPointCloudStatistics[source]¶
Returns the object containing statistics
Added in version 3.26.
- Return type:
- statisticsCalculationState(self) QgsPointCloudLayer.PointCloudStatisticsCalculationState[source]¶
Returns the status of point cloud statistics calculation
Added in version 3.26.
- signal statisticsCalculationStateChanged[source]¶
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.
- subsetString(self) str[source]¶
Returns the string used to define a subset of the layer.
- Return type:
str
- Returns:
The subset string or an empty string if not implemented by the provider
Added in version 3.26.
- signal subsetStringChanged[source]¶
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.