QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
QgsMeshDataProviderTemporalCapabilities Class Reference

Class for handling properties relating to a mesh data provider's temporal capabilities. More...

#include <qgsmeshdataprovidertemporalcapabilities.h>

Inheritance diagram for QgsMeshDataProviderTemporalCapabilities:
Inheritance graph
[legend]

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.
 

Detailed Description

Class for handling properties relating to a mesh data provider's temporal capabilities.

Since
QGIS 3.14

Definition at line 35 of file qgsmeshdataprovidertemporalcapabilities.h.

Member Enumeration Documentation

◆ MatchingTemporalDatasetMethod

Method for selection of temporal mesh dataset from a range time.

Enumerator
FindClosestDatasetBeforeStartRangeTime 
FindClosestDatasetFromStartRangeTime 

Finds the closest dataset which have its time before the requested start range time.

Finds the closest dataset before or after the requested start range time

Definition at line 42 of file qgsmeshdataprovidertemporalcapabilities.h.

Constructor & Destructor Documentation

◆ QgsMeshDataProviderTemporalCapabilities()

QgsMeshDataProviderTemporalCapabilities::QgsMeshDataProviderTemporalCapabilities ( )

Member Function Documentation

◆ addDatasetTime()

void QgsMeshDataProviderTemporalCapabilities::addDatasetTime ( int  group,
double  time 
)

Adds a time (in provider unit) from a dataset contained in group.

Note
must be used only by the mesh data provider, all dataset need to be added one after one

Definition at line 93 of file qgsmeshdataprovidertemporalcapabilities.cpp.

◆ addDatasetTimeInMilliseconds()

void QgsMeshDataProviderTemporalCapabilities::addDatasetTimeInMilliseconds ( int  group,
qint64  time 
)

Adds a time (in milliseconds) from a dataset contained in group.

Note
must be used only by the mesh data provider, all dataset need to be added one after one

Definition at line 87 of file qgsmeshdataprovidertemporalcapabilities.cpp.

◆ addGroupReferenceDateTime()

void QgsMeshDataProviderTemporalCapabilities::addGroupReferenceDateTime ( int  group,
const QDateTime &  reference 
)

Adds a reference date/time from a dataset group.

Note
must be used only by the mesh data provider

Definition at line 78 of file qgsmeshdataprovidertemporalcapabilities.cpp.

◆ clear()

void QgsMeshDataProviderTemporalCapabilities::clear ( )

Clears all stored reference times and dataset times.

Definition at line 170 of file qgsmeshdataprovidertemporalcapabilities.cpp.

◆ datasetIndexClosestBeforeRelativeTime()

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

Note
for non temporal dataset group, timeSinceGlobalReference is not used and the unique dataset is returned

Definition at line 54 of file qgsmeshdataprovidertemporalcapabilities.cpp.

◆ datasetIndexClosestFromRelativeTime()

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

Note
for non temporal dataset group, timeSinceGlobalReference is not used and the unique dataset is returned

Definition at line 24 of file qgsmeshdataprovidertemporalcapabilities.cpp.

◆ datasetTime()

qint64 QgsMeshDataProviderTemporalCapabilities::datasetTime ( const QgsMeshDatasetIndex index) const

Returns the relative time in milliseconds of the dataset.

Definition at line 158 of file qgsmeshdataprovidertemporalcapabilities.cpp.

◆ firstTimeStepDuration()

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.

◆ hasReferenceTime()

bool QgsMeshDataProviderTemporalCapabilities::hasReferenceTime ( ) const

Returns whether the reference time is set.

Definition at line 99 of file qgsmeshdataprovidertemporalcapabilities.cpp.

◆ referenceTime()

QDateTime QgsMeshDataProviderTemporalCapabilities::referenceTime ( ) const

Returns the reference time.

Definition at line 104 of file qgsmeshdataprovidertemporalcapabilities.cpp.

◆ setTemporalUnit()

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.

◆ temporalUnit()

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.

◆ timeExtent() [1/2]

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.

◆ timeExtent() [2/2]

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.


The documentation for this class was generated from the following files: