Class: QgsVectorDataProviderTemporalCapabilities

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

Bases: QgsDataProviderTemporalCapabilities

Constructor for QgsVectorDataProviderTemporalCapabilities.

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

QgsVectorDataProviderTemporalCapabilities(QgsVectorDataProviderTemporalCapabilities)

Implementation of data provider temporal properties for QgsVectorDataProviders.

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.

Methods

availableTemporalRange

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

endField

Returns the name of the end datetime field, which stores the end time for the feature’s time spans.

mode

Returns the temporal properties mode.

setAvailableTemporalRange

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

setEndField

Sets the name of the end datetime field, which stores the end time for the feature’s time spans.

setMode

Sets the temporal properties mode.

setStartField

Sets the name of the start datetime field, which stores the start time for the feature’s time spans.

startField

Returns the name of the start datetime field, which contains the start time for the feature’s time spans.

Attributes

ProviderHasFixedTemporalRange

ProviderStoresFeatureDateTimeInstantInField

ProviderStoresFeatureDateTimeStartAndEndInSeparateFields

ProviderHasFixedTemporalRange = 0
ProviderStoresFeatureDateTimeInstantInField = 1
ProviderStoresFeatureDateTimeStartAndEndInSeparateFields = 2
class TemporalMode

Bases: int

availableTemporalRange(self)QgsDateTimeRange

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

Return type

QgsDateTimeRange

endField(self)str

Returns the name of the end datetime field, which stores the end time for the feature’s time spans.

See also

setEndField()

See also

startField()

Return type

str

mode(self)QgsVectorDataProviderTemporalCapabilities.TemporalMode

Returns the temporal properties mode.

See also

setMode()

Return type

QgsVectorDataProviderTemporalCapabilities.TemporalMode

setAvailableTemporalRange(self, range: QgsDateTimeRange)

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

Parameters

range (QgsDateTimeRange) –

setEndField(self, field: str)

Sets the name of the end datetime field, which stores the end time for the feature’s time spans.

See also

endField()

See also

setStartField()

Parameters

field (str) –

setMode(self, mode: QgsVectorDataProviderTemporalCapabilities.TemporalMode)

Sets the temporal properties mode.

See also

mode()

Parameters

mode (QgsVectorDataProviderTemporalCapabilities.TemporalMode) –

setStartField(self, field: str)

Sets the name of the start datetime field, which stores the start time for the feature’s time spans.

If mode() is ModeFeatureDateTimeInstantFromField, then this field stores both the start AND end times.

See also

startField()

See also

setEndField()

Parameters

field (str) –

startField(self)str

Returns the name of the start datetime field, which contains the start time for the feature’s time spans.

If mode() is ProviderStoresFeatureDateTimeInstantInField, then this field stores both the start AND end times.

See also

setStartField()

See also

endField()

Return type

str