Class: QgsRasterLayerUtils¶
- class qgis.core.QgsRasterLayerUtils¶
Bases:
sip.wrapper
Contains utility functions for working with raster layers.
Added in version 3.38:
Methods
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:
layer (QgsRasterLayer) – Target raster layer
temporalRange (QgsDateTimeRange) – temporal range for rendering
elevationRange (QgsDoubleRange) – elevation range for rendering
- 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.