Class: QgsRasterLayerUtils

Contains utility functions for working with raster layers.

Added in version 3.38.

Static 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.

class qgis.core.QgsRasterLayerUtils[source]

Bases: object

static renderedBandForElevationAndTemporalRange(layer: QgsRasterLayer | None, temporalRange: QgsDateTimeRange, elevationRange: QgsDoubleRange)[source]

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:
Returns:

  • Matched band, or -1 if the layer does not have any elevation or temporal settings which affect the rendered band.

  • matched: True if a band matching the temporal and elevation range was found