Class: QgsRasterLayerUtils

class qgis.core.QgsRasterLayerUtils

Bases: sip.wrapper

Contains utility functions for working with raster layers.

Added in version 3.38:

Methods

renderedBandForElevationAndTemporalRange

Given a raster layer, returns the band which should be used for rendering the layer for a specified temporal and elevation range, respecting any elevation and temporal settings which affect the rendered band.

renderedBandForElevationAndTemporalRange(layer: QgsRasterLayer, temporalRange: QgsDateTimeRange, elevationRange: QgsDoubleRange) Tuple[int, bool]

Given a raster layer, returns the band which should be used for rendering the layer for a specified temporal and elevation range, respecting any elevation and temporal settings which affect the rendered band.

Parameters:
Return type:

Tuple[int, bool]

Returns:

  • Matched band, or -1 if the layer does not have any elevation

  • matched: will be set to True if a band matching the temporal and elevation range was found

or temporal settings which affect the rendered band.