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

calculateZRangeForProject

Calculates the elevation range for a project.

canEnableElevationForLayer

Returns True if elevation can be enabled for a map layer.

enableElevationForLayer

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:

QgsDoubleRange

canEnableElevationForLayer(layer: QgsMapLayer) bool

Returns True if elevation can be enabled for a map layer.

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