Class: QgsRasterLayerTemporalProperties

class qgis.core.QgsRasterLayerTemporalProperties

Bases: QgsMapLayerTemporalProperties

Implementation of map layer temporal properties for raster layers.

New in version 3.14.

QgsRasterLayerTemporalProperties(parent: QObject = None, enabled: bool = False) Constructor for QgsRasterLayerTemporalProperties, with the specified parent object.

The enabled argument specifies whether the temporal properties are initially enabled or not (see isActive()).

Enums

TemporalMode

alias of RasterTemporalMode

Methods

allTemporalRanges

param layer:

bandForTemporalRange

Returns the band corresponding to the specified range.

bandNumber

Returns the band number from which temporal values should be taken.

childEvent

connectNotify

customEvent

disconnectNotify

filteredBandsForTemporalRange

Returns a filtered list of bands which match the specified range.

fixedRangePerBand

Returns the fixed temporal range for each band.

fixedTemporalRange

Returns the fixed temporal range for the layer.

flags

Returns flags associated to the temporal property.

intervalHandlingMethod

Returns the desired method to use when resolving a temporal interval to matching layers or bands in the data provider.

isSignalConnected

isVisibleInTemporalRange

param range:

mode

Returns the temporal properties mode.

readXml

param element:

receivers

sender

senderSignalIndex

setBandNumber

Sets the band number from which temporal values should be taken.

setDefaultsFromDataProviderTemporalCapabilities

param capabilities:

setFixedRangePerBand

Sets the fixed temporal range for each band.

setFixedTemporalRange

Sets a temporal range to apply to the whole layer.

setIntervalHandlingMethod

Sets the desired method to use when resolving a temporal interval to matching layers or bands in the data provider.

setMode

Sets the temporal properties mode.

setTemporalRepresentationOffset

Sets the temporal offset, which is a fixed datetime which should be added to individual pixel values from the layer.

setTemporalRepresentationScale

Sets the scale, which is an interval factor which should be applied to individual pixel values from the layer.

temporalRepresentationOffset

Returns the temporal offset, which is a fixed datetime which should be added to individual pixel values from the layer.

temporalRepresentationScale

Returns the scale, which is an interval factor which should be applied to individual pixel values from the layer.

timerEvent

writeXml

param element:

TemporalMode

alias of RasterTemporalMode

allTemporalRanges(self, layer: QgsMapLayer) List[QgsDateTimeRange]
Parameters:

layer (QgsMapLayer) –

Return type:

List[QgsDateTimeRange]

bandForTemporalRange(self, layer: QgsRasterLayer, range: QgsDateTimeRange) int

Returns the band corresponding to the specified range.

Note

This is only considered when mode() is Qgis.RasterTemporalMode.FixedRangePerBand. For other modes it will always return -1.

New in version 3.38.

Parameters:
Return type:

int

bandNumber(self) int

Returns the band number from which temporal values should be taken.

Note

This is only considered when mode() is Qgis.RasterTemporalMode.RepresentsTemporalValues.

See also

setBandNumber()

New in version 3.38.

Return type:

int

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
filteredBandsForTemporalRange(self, layer: QgsRasterLayer, range: QgsDateTimeRange) List[int]

Returns a filtered list of bands which match the specified range.

New in version 3.38.

Parameters:
Return type:

List[int]

fixedRangePerBand(self) Dict[int, QgsDateTimeRange]

Returns the fixed temporal range for each band.

Note

This is only considered when mode() is Qgis.RasterTemporalMode.FixedRangePerBand.

New in version 3.38.

Return type:

Dict[int, QgsDateTimeRange]

fixedTemporalRange(self) QgsDateTimeRange

Returns the fixed temporal range for the layer.

Warning

To be used only when mode() is Qgis.RasterTemporalMode.FixedTemporalRange

Return type:

QgsDateTimeRange

flags(self) QgsTemporalProperty.Flags

Returns flags associated to the temporal property.

Return type:

QgsTemporalProperty.Flags

intervalHandlingMethod(self) Qgis.TemporalIntervalMatchMethod

Returns the desired method to use when resolving a temporal interval to matching layers or bands in the data provider.

Return type:

Qgis.TemporalIntervalMatchMethod

isSignalConnected(self, QMetaMethod) bool
isVisibleInTemporalRange(self, range: QgsDateTimeRange) bool
Parameters:

range (QgsDateTimeRange) –

Return type:

bool

mode(self) Qgis.RasterTemporalMode

Returns the temporal properties mode.

See also

setMode()

Return type:

Qgis.RasterTemporalMode

readXml(self, element: QDomElement, context: QgsReadWriteContext) bool
Parameters:
Return type:

bool

receivers(self, PYQT_SIGNAL) int
sender(self) QObject
senderSignalIndex(self) int
setBandNumber(self, number: int)

Sets the band number from which temporal values should be taken.

Note

This is only considered when mode() is Qgis.RasterTemporalMode.RepresentsTemporalValues.

See also

bandNumber()

New in version 3.38.

Parameters:

number (int) –

setDefaultsFromDataProviderTemporalCapabilities(self, capabilities: QgsDataProviderTemporalCapabilities)
Parameters:

capabilities (QgsDataProviderTemporalCapabilities) –

setFixedRangePerBand(self, ranges: Dict[int, QgsDateTimeRange])

Sets the fixed temporal range for each band.

Note

This is only considered when mode() is Qgis.RasterTemporalMode.FixedRangePerBand.

New in version 3.38.

Parameters:

ranges (Dict[int) –

setFixedTemporalRange(self, range: QgsDateTimeRange)

Sets a temporal range to apply to the whole layer. All bands from the raster layer will be rendered whenever the current datetime range of a render context intersects the specified range.

Warning

This setting is only effective when mode() is Qgis.RasterTemporalMode.FixedTemporalRange

Parameters:

range (QgsDateTimeRange) –

setIntervalHandlingMethod(self, method: Qgis.TemporalIntervalMatchMethod)

Sets the desired method to use when resolving a temporal interval to matching layers or bands in the data provider.

Parameters:

method (Qgis.TemporalIntervalMatchMethod) –

setMode(self, mode: Qgis.RasterTemporalMode)

Sets the temporal properties mode.

See also

mode()

Parameters:

mode (Qgis.RasterTemporalMode) –

setTemporalRepresentationOffset(self, offset: QDateTime | datetime.datetime)

Sets the temporal offset, which is a fixed datetime which should be added to individual pixel values from the layer.

Note

This is only considered when mode() is Qgis.RasterTemporalMode.RepresentsTemporalValues.

New in version 3.38.

Parameters:

offset (Union[QDateTime) –

setTemporalRepresentationScale(self, scale: QgsInterval)

Sets the scale, which is an interval factor which should be applied to individual pixel values from the layer.

Note

This is only considered when mode() is Qgis.RasterTemporalMode.RepresentsTemporalValues.

New in version 3.38.

Parameters:

scale (QgsInterval) –

temporalRepresentationOffset(self) QDateTime

Returns the temporal offset, which is a fixed datetime which should be added to individual pixel values from the layer.

Note

This is only considered when mode() is Qgis.RasterTemporalMode.RepresentsTemporalValues.

New in version 3.38.

Return type:

QDateTime

temporalRepresentationScale(self) QgsInterval

Returns the scale, which is an interval factor which should be applied to individual pixel values from the layer.

Note

This is only considered when mode() is Qgis.RasterTemporalMode.RepresentsTemporalValues.

New in version 3.38.

Return type:

QgsInterval

timerEvent(self, QTimerEvent)
writeXml(self, element: QDomElement, doc: QDomDocument, context: QgsReadWriteContext) QDomElement
Parameters:
Return type:

QDomElement