Class: QgsRasterDataProviderTemporalCapabilities

class qgis.core.QgsRasterDataProviderTemporalCapabilities(enabled: bool = False)

Bases: QgsDataProviderTemporalCapabilities

Constructor for QgsRasterDataProviderTemporalProperties.

The enabled argument specifies whether the data provider has temporal capabilities.

QgsRasterDataProviderTemporalCapabilities(QgsRasterDataProviderTemporalCapabilities)

Implementation of data provider temporal properties for QgsRasterDataProviders.

Data provider temporal capabilities reflect the temporal capabilities of a QgsDataProvider. Unlike QgsMapLayerTemporalProperties, these settings are not user-configurable, and should only be set by the QgsDataProvider itself.

New in version 3.14.

Parameters

enabled

class IntervalHandlingMethod

Bases: int

MatchExactUsingEndOfRange = 2
MatchExactUsingStartOfRange = 1
MatchUsingWholeRange = 0
availableReferenceTemporalRange(self)QgsDateTimeRange

Returns the available reference datetime range, which indicates the maximum extent of datetime values available for reference temporal ranges from the provider.

Return type

QgsDateTimeRange

availableTemporalRange(self)QgsDateTimeRange

Returns the datetime range extent from which temporal data is available from the provider.

Return type

QgsDateTimeRange

intervalHandlingMethod(self) → QgsRasterDataProviderTemporalCapabilities.IntervalHandlingMethod

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

Return type

QgsRasterDataProviderTemporalCapabilities.IntervalHandlingMethod

isReferenceEnable(self) → bool

Returns the enabled status of the reference range.

Return type

bool

isTimeEnabled(self) → bool

Returns the temporal property status.

See also

setEnableTime()

Return type

bool

requestedReferenceTemporalRange(self)QgsDateTimeRange

Returns the requested reference temporal range. Intended to be used by the provider in fetching data.

Return type

QgsDateTimeRange

requestedTemporalRange(self)QgsDateTimeRange

Returns the requested temporal range. Intended to be used by the provider in fetching data.

Return type

QgsDateTimeRange

setAvailableReferenceTemporalRange(self, range: QgsDateTimeRange)

Sets the available reference datetime range. This is to be used for bi-temporal based data. Where data can have both nominal and reference times.

Parameters

range (QgsDateTimeRange) –

setAvailableTemporalRange(self, range: QgsDateTimeRange)

Sets the datetime range extent from which temporal data is available from the provider.

Parameters

range (QgsDateTimeRange) –

setEnableTime(self, enabled: bool)

Sets the time enabled status. This enables whether time part in the temporal range should be used when updated the temporal range of these capabilities.

This is useful in some temporal layers who use dates only.

See also

isTimeEnabled()

Parameters

enabled (bool) –

setIntervalHandlingMethod(self, method: QgsRasterDataProviderTemporalCapabilities.IntervalHandlingMethod)

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

Parameters

method (QgsRasterDataProviderTemporalCapabilities.IntervalHandlingMethod) –

setReferenceEnable(self, enabled: bool)

Sets the usage status of the reference range.

Parameters

enabled (bool) –

setRequestedReferenceTemporalRange(self, range: QgsDateTimeRange)

Sets the requested reference temporal range to retrieve when returning data from the associated data provider.

Note

this is not normally manually set, and is intended for use by QgsRasterLayerRenderer to automatically set the requested temporal range on a clone of the data provider during a render job.

Parameters

range (QgsDateTimeRange) –