Class: QgsElevationUtils¶
- class qgis.core.QgsElevationUtils¶
Bases:
sip.wrapper
Contains utility methods for working with elevation from layers and projects.
New in version 3.18:
Methods
Calculates the elevation range for a
project
.Returns
True
if elevation can be enabled for a maplayer
.Automatically enables elevation for a map
layer
, using reasonable defaults.- calculateZRangeForProject(project: QgsProject) QgsDoubleRange ¶
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 (QgsProject) –
- Return type:
- canEnableElevationForLayer(layer: QgsMapLayer) bool ¶
Returns
True
if elevation can be enabled for a maplayer
.New in version 3.32.
- Parameters:
layer (QgsMapLayer) –
- Return type:
bool
- enableElevationForLayer(layer: QgsMapLayer) bool ¶
Automatically enables elevation for a map
layer
, using reasonable defaults.Returns
True
if the elevation was enabled successfully.New in version 3.32.
- Parameters:
layer (QgsMapLayer) –
- Return type:
bool