Class: QgsElevationUtils¶
Contains utility methods for working with elevation from layers and projects.
Added in version 3.18.
List of all members, including inherited members
Static Methods
Calculates the elevation range for the specified layers. |
|
Calculates the elevation range for a project. |
|
Returns |
|
Automatically enables elevation for a map layer, using reasonable defaults. |
|
Returns a list of significant elevation/z-values for the specified layers. |
|
Returns a list of significant elevation/z-values for the specified project, using the values from layers contained by the project. |
- class qgis.core.QgsElevationUtils[source]¶
Bases:
object- static calculateZRangeForLayers(layers: Iterable[QgsMapLayer]) QgsDoubleRange[source]¶
Calculates the elevation range for the specified
layers.This method considers the elevation (or Z) range available from each of the
layersand returns the maximal combined elevation range of these layers.Added in version 4.4.
- Parameters:
layers (Iterable[QgsMapLayer])
- Return type:
- static calculateZRangeForProject(project: QgsProject | None) QgsDoubleRange[source]¶
Calculates the elevation range for a
project.This method considers the elevation (or z) range available from layers contained within the project and returns the maximal combined elevation range of these layers.
- Parameters:
project (Optional[QgsProject])
- Return type:
- static canEnableElevationForLayer(layer: QgsMapLayer | None) bool[source]¶
Returns
Trueif elevation can be enabled for a maplayer.Added in version 3.32.
- Parameters:
layer (Optional[QgsMapLayer])
- Return type:
bool
- static enableElevationForLayer(layer: QgsMapLayer | None) bool[source]¶
Automatically enables elevation for a map
layer, using reasonable defaults.Returns
Trueif the elevation was enabled successfully.Added in version 3.32.
- Parameters:
layer (Optional[QgsMapLayer])
- Return type:
bool
- static significantZValuesForLayers(layers: Iterable[QgsMapLayer]) list[float]¶
Returns a list of significant elevation/z-values for the specified
layers.These values will be highlighted in elevation related widgets for the project.
Added in version 3.38.
- Parameters:
layers (Iterable[QgsMapLayer])
- Return type:
list[float]
- static significantZValuesForProject(project: QgsProject | None) list[float]¶
Returns a list of significant elevation/z-values for the specified
project, using the values from layers contained by the project.These values will be highlighted in elevation related widgets for the project.
Added in version 3.38.
- Parameters:
project (Optional[QgsProject])
- Return type:
list[float]