Class: QgsMeshDataProviderTemporalCapabilities¶
- class qgis.core.QgsMeshDataProviderTemporalCapabilities¶
Bases:
QgsDataProviderTemporalCapabilities
Class for handling properties relating to a mesh data provider’s temporal capabilities.
New in version 3.14.
QgsMeshDataProviderTemporalCapabilities() Constructor for QgsMeshDataProviderTemporalCapabilities
QgsMeshDataProviderTemporalCapabilities(
QgsMeshDataProviderTemporalCapabilities
)Methods
Clears alls stored reference times and dataset times
Returns the last dataset with time less than or equal to
timeSinceGlobalReference
Returns the closest dataset index from the
timeSinceGlobalReference
Returns the relative time in milliseconds of the dataset
Returns the duration of the first time step of the dataset group with index
group
Returns whether the reference time is set
Returns the reference time
Sets the temporal unit (
temporalUnit
) used to read data by the data providerReturns the temporal unit used to read data by the data provider
Returns the time extent using the internal reference time and the first and last times available from the all the dataset
Attributes
- FindClosestDatasetBeforeStartRangeTime = 0¶
- FindClosestDatasetFromStartRangeTime = 1¶
- class MatchingTemporalDatasetMethod¶
Bases:
int
- clear(self)¶
Clears alls stored reference times and dataset times
- datasetIndexClosestBeforeRelativeTime(self, group: int, timeSinceGlobalReference: int) QgsMeshDatasetIndex ¶
Returns the last dataset with time less than or equal to
timeSinceGlobalReference
Returns invalid dataset index if
timeSinceGlobalReference
is outside the time extent of the dataset groupNote
for non temporal dataset group,
timeSinceGlobalReference
is not used and the unique dataset is returned- Parameters
group (int) –
timeSinceGlobalReference (int) –
- Return type
- datasetIndexClosestFromRelativeTime(self, group: int, timeSinceGlobalReference: int) QgsMeshDatasetIndex ¶
Returns the closest dataset index from the
timeSinceGlobalReference
Returns invalid dataset index if
timeSinceGlobalReference
is outside the time extent of the dataset groupNote
for non temporal dataset group,
timeSinceGlobalReference
is not used and the unique dataset is returned- Parameters
group (int) –
timeSinceGlobalReference (int) –
- Return type
- datasetTime(self, index: QgsMeshDatasetIndex) int ¶
Returns the relative time in milliseconds of the dataset
- Parameters
index (QgsMeshDatasetIndex) –
- Return type
int
- firstTimeStepDuration(self, group: int) int ¶
Returns the duration of the first time step of the dataset group with index
group
The value is -1 if the dataset group is not present or if it contains only one dataset (non temporal dataset)
- Parameters
group (int) –
- Return type
int
- hasReferenceTime(self) bool ¶
Returns whether the reference time is set
- Return type
bool
- referenceTime(self) QDateTime ¶
Returns the reference time
- Return type
QDateTime
- setTemporalUnit(self, temporalUnit: QgsUnitTypes.TemporalUnit)¶
Sets the temporal unit (
temporalUnit
) used to read data by the data providerTemporal units supported are milliseconds, seconds, minutes, hors, days and weeks
- Parameters
temporalUnit (QgsUnitTypes.TemporalUnit) –
- temporalUnit(self) QgsUnitTypes.TemporalUnit ¶
Returns the temporal unit used to read data by the data provider
- Return type
- timeExtent(self) QgsDateTimeRange ¶
Returns the time extent using the internal reference time and the first and last times available from the all the dataset
timeExtent(self, reference: Union[QDateTime, datetime.datetime]) -> QgsDateTimeRange Returns the time extent using an external
reference
date time and the first and last times available from the all the dataset- Return type