QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
Class for handling properties relating to a mesh data provider's temporal capabilities. More...
#include <qgsmeshdataprovidertemporalcapabilities.h>
Public Types | |
enum | MatchingTemporalDatasetMethod { FindClosestDatasetBeforeStartRangeTime , FindClosestDatasetFromStartRangeTime } |
Method for selection of temporal mesh dataset from a range time. More... | |
Public Member Functions | |
QgsMeshDataProviderTemporalCapabilities () | |
Constructor for QgsMeshDataProviderTemporalCapabilities. | |
void | addDatasetTime (int group, double time) |
Adds a time (in provider unit) from a dataset contained in group. | |
void | addDatasetTimeInMilliseconds (int group, qint64 time) |
Adds a time (in milliseconds) from a dataset contained in group. | |
void | addGroupReferenceDateTime (int group, const QDateTime &reference) |
Adds a reference date/time from a dataset group. | |
void | clear () |
Clears all stored reference times and dataset times. | |
QgsMeshDatasetIndex | datasetIndexClosestBeforeRelativeTime (int group, qint64 timeSinceGlobalReference) const |
Returns the last dataset with time less than or equal to timeSinceGlobalReference. | |
QgsMeshDatasetIndex | datasetIndexClosestFromRelativeTime (int group, qint64 timeSinceGlobalReference) const |
Returns the closest dataset index from the timeSinceGlobalReference. | |
qint64 | datasetTime (const QgsMeshDatasetIndex &index) const |
Returns the relative time in milliseconds of the dataset. | |
qint64 | firstTimeStepDuration (int group) const |
Returns the duration of the first time step of the dataset group with index group. | |
bool | hasReferenceTime () const |
Returns whether the reference time is set. | |
QDateTime | referenceTime () const |
Returns the reference time. | |
void | setTemporalUnit (Qgis::TemporalUnit temporalUnit) |
Sets the temporal unit (temporalUnit) used to read data by the data provider. | |
Qgis::TemporalUnit | temporalUnit () const |
Returns the temporal unit used to read data by the data provider. | |
QgsDateTimeRange | timeExtent () const |
Returns the time extent using the internal reference time and the first and last times available from the all the dataset. | |
QgsDateTimeRange | timeExtent (const QDateTime &reference) const |
Returns the time extent using an external reference date time and the first and last times available from the all the dataset. | |
Public Member Functions inherited from QgsDataProviderTemporalCapabilities | |
QgsDataProviderTemporalCapabilities (bool available=false) | |
Constructor for QgsDataProviderTemporalCapabilities. | |
virtual | ~QgsDataProviderTemporalCapabilities ()=default |
bool | hasTemporalCapabilities () const |
Returns true if the provider has temporal capabilities available. | |
void | setHasTemporalCapabilities (bool available) |
Sets whether the provider has temporal capabilities available. | |
Class for handling properties relating to a mesh data provider's temporal capabilities.
Definition at line 35 of file qgsmeshdataprovidertemporalcapabilities.h.
Method for selection of temporal mesh dataset from a range time.
Definition at line 42 of file qgsmeshdataprovidertemporalcapabilities.h.
QgsMeshDataProviderTemporalCapabilities::QgsMeshDataProviderTemporalCapabilities | ( | ) |
Constructor for QgsMeshDataProviderTemporalCapabilities.
Definition at line 21 of file qgsmeshdataprovidertemporalcapabilities.cpp.
void QgsMeshDataProviderTemporalCapabilities::addDatasetTime | ( | int | group, |
double | time | ||
) |
Adds a time (in provider unit) from a dataset contained in group.
Definition at line 93 of file qgsmeshdataprovidertemporalcapabilities.cpp.
void QgsMeshDataProviderTemporalCapabilities::addDatasetTimeInMilliseconds | ( | int | group, |
qint64 | time | ||
) |
Adds a time (in milliseconds) from a dataset contained in group.
Definition at line 87 of file qgsmeshdataprovidertemporalcapabilities.cpp.
void QgsMeshDataProviderTemporalCapabilities::addGroupReferenceDateTime | ( | int | group, |
const QDateTime & | reference | ||
) |
Adds a reference date/time from a dataset group.
Definition at line 78 of file qgsmeshdataprovidertemporalcapabilities.cpp.
void QgsMeshDataProviderTemporalCapabilities::clear | ( | ) |
Clears all stored reference times and dataset times.
Definition at line 170 of file qgsmeshdataprovidertemporalcapabilities.cpp.
QgsMeshDatasetIndex QgsMeshDataProviderTemporalCapabilities::datasetIndexClosestBeforeRelativeTime | ( | int | group, |
qint64 | timeSinceGlobalReference | ||
) | const |
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 group
Definition at line 54 of file qgsmeshdataprovidertemporalcapabilities.cpp.
QgsMeshDatasetIndex QgsMeshDataProviderTemporalCapabilities::datasetIndexClosestFromRelativeTime | ( | int | group, |
qint64 | timeSinceGlobalReference | ||
) | const |
Returns the closest dataset index from the timeSinceGlobalReference.
Returns invalid dataset index if timeSinceGlobalReference is outside the time extent of the dataset group
Definition at line 24 of file qgsmeshdataprovidertemporalcapabilities.cpp.
qint64 QgsMeshDataProviderTemporalCapabilities::datasetTime | ( | const QgsMeshDatasetIndex & | index | ) | const |
Returns the relative time in milliseconds of the dataset.
Definition at line 158 of file qgsmeshdataprovidertemporalcapabilities.cpp.
qint64 QgsMeshDataProviderTemporalCapabilities::firstTimeStepDuration | ( | int | group | ) | const |
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)
Definition at line 177 of file qgsmeshdataprovidertemporalcapabilities.cpp.
bool QgsMeshDataProviderTemporalCapabilities::hasReferenceTime | ( | ) | const |
Returns whether the reference time is set.
Definition at line 99 of file qgsmeshdataprovidertemporalcapabilities.cpp.
QDateTime QgsMeshDataProviderTemporalCapabilities::referenceTime | ( | ) | const |
Returns the reference time.
Definition at line 104 of file qgsmeshdataprovidertemporalcapabilities.cpp.
void QgsMeshDataProviderTemporalCapabilities::setTemporalUnit | ( | Qgis::TemporalUnit | temporalUnit | ) |
Sets the temporal unit (temporalUnit) used to read data by the data provider.
Temporal units supported are milliseconds, seconds, minutes, hors, days and weeks
Definition at line 148 of file qgsmeshdataprovidertemporalcapabilities.cpp.
Qgis::TemporalUnit QgsMeshDataProviderTemporalCapabilities::temporalUnit | ( | ) | const |
Returns the temporal unit used to read data by the data provider.
Definition at line 153 of file qgsmeshdataprovidertemporalcapabilities.cpp.
QgsDateTimeRange QgsMeshDataProviderTemporalCapabilities::timeExtent | ( | ) | const |
Returns the time extent using the internal reference time and the first and last times available from the all the dataset.
Definition at line 109 of file qgsmeshdataprovidertemporalcapabilities.cpp.
QgsDateTimeRange QgsMeshDataProviderTemporalCapabilities::timeExtent | ( | const QDateTime & | reference | ) | const |
Returns the time extent using an external reference date time and the first and last times available from the all the dataset.
Definition at line 115 of file qgsmeshdataprovidertemporalcapabilities.cpp.