QGIS API Documentation 4.3.0-Master (d3b565c628d)
Loading...
Searching...
No Matches
QgsElevationUtils Class Reference

Contains utility methods for working with elevation from layers and projects. More...

#include <qgselevationutils.h>

Static Public Member Functions

static QgsDoubleRange calculateZRangeForLayers (const QList< QgsMapLayer * > &layers)
 Calculates the elevation range for the specified layers.
static QgsDoubleRange calculateZRangeForProject (QgsProject *project)
 Calculates the elevation range for a project.
static bool canEnableElevationForLayer (QgsMapLayer *layer)
 Returns true if elevation can be enabled for a map layer.
static bool enableElevationForLayer (QgsMapLayer *layer)
 Automatically enables elevation for a map layer, using reasonable defaults.
static QList< double > significantZValuesForLayers (const QList< QgsMapLayer * > &layers)
 Returns a list of significant elevation/z-values for the specified layers.
static QList< double > significantZValuesForProject (QgsProject *project)
 Returns a list of significant elevation/z-values for the specified project, using the values from layers contained by the project.

Detailed Description

Contains utility methods for working with elevation from layers and projects.

Since
QGIS 3.18

Definition at line 32 of file qgselevationutils.h.

Member Function Documentation

◆ calculateZRangeForLayers()

QgsDoubleRange QgsElevationUtils::calculateZRangeForLayers ( const QList< QgsMapLayer * > & layers)
static

Calculates the elevation range for the specified layers.

This method considers the elevation (or Z) range available from each of the layers and returns the maximal combined elevation range of these layers.

Since
QGIS 4.4

Definition at line 36 of file qgselevationutils.cpp.

◆ calculateZRangeForProject()

QgsDoubleRange QgsElevationUtils::calculateZRangeForProject ( QgsProject * project)
static

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.

Definition at line 22 of file qgselevationutils.cpp.

◆ canEnableElevationForLayer()

bool QgsElevationUtils::canEnableElevationForLayer ( QgsMapLayer * layer)
static

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

Since
QGIS 3.32

Definition at line 100 of file qgselevationutils.cpp.

◆ enableElevationForLayer()

bool QgsElevationUtils::enableElevationForLayer ( QgsMapLayer * layer)
static

Automatically enables elevation for a map layer, using reasonable defaults.

Returns true if the elevation was enabled successfully.

Since
QGIS 3.32

Definition at line 105 of file qgselevationutils.cpp.

◆ significantZValuesForLayers()

QList< double > QgsElevationUtils::significantZValuesForLayers ( const QList< QgsMapLayer * > & layers)
static

Returns a list of significant elevation/z-values for the specified layers.

These values will be highlighted in elevation related widgets for the project.

Since
QGIS 3.38

Definition at line 79 of file qgselevationutils.cpp.

◆ significantZValuesForProject()

QList< double > QgsElevationUtils::significantZValuesForProject ( QgsProject * project)
static

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.

Since
QGIS 3.38

Definition at line 66 of file qgselevationutils.cpp.


The documentation for this class was generated from the following files: