QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsMeshExtraDatasetStore Class Reference

Class that can be used to store and access extra dataset group, like memory dataset (temporary) Derived from QgsMeshDatasetSourceInterface, this class has same methods as QgsMeshDataProvider to access to the datasets. More...

#include <qgsmeshdatasetgroupstore.h>

Inheritance diagram for QgsMeshExtraDatasetStore:
Inheritance graph
[legend]

Public Member Functions

bool addDataset (const QString &uri) override
 Not implemented, always returns false.
 
int addDatasetGroup (QgsMeshDatasetGroup *datasetGroup)
 Adds a dataset group, returns the index of the added dataset group.
 
QgsMeshDataBlock areFacesActive (QgsMeshDatasetIndex index, int faceIndex, int count) const override
 Returns whether the faces are active for particular dataset.
 
QgsMesh3DDataBlock dataset3dValues (QgsMeshDatasetIndex index, int faceIndex, int count) const override
 Returns N vector/scalar values from the face index from the dataset for 3d stacked meshes.
 
int datasetCount (int groupIndex) const override
 Returns number of datasets loaded in the group.
 
QgsMeshDatasetGroupdatasetGroup (int groupIndex) const
 Returns a pointer to the dataset group.
 
int datasetGroupCount () const override
 Returns number of datasets groups loaded.
 
QgsMeshDatasetGroupMetadata datasetGroupMetadata (int groupIndex) const override
 Returns dataset group metadata.
 
QgsMeshDatasetMetadata datasetMetadata (QgsMeshDatasetIndex index) const override
 Returns dataset metadata.
 
qint64 datasetRelativeTime (QgsMeshDatasetIndex index) const
 Returns the relative times of the dataset index with index, returned value in milliseconds.
 
QgsMeshDatasetValue datasetValue (QgsMeshDatasetIndex index, int valueIndex) const override
 Returns vector/scalar value associated with the index from the dataset To read multiple continuous values, use datasetValues()
 
QgsMeshDataBlock datasetValues (QgsMeshDatasetIndex index, int valueIndex, int count) const override
 Returns N vector/scalar values from the index from the dataset.
 
QString description (int groupIndex) const
 Returns information related to the dataset group with groupIndex.
 
QStringList extraDatasets () const override
 Not implemented, always returns empty list.
 
bool hasTemporalCapabilities () const
 Returns whether if the dataset groups have temporal capabilities (a least one dataset group with more than one dataset)
 
bool isFaceActive (QgsMeshDatasetIndex index, int faceIndex) const override
 Returns whether the face is active for particular dataset.
 
bool persistDatasetGroup (const QString &outputFilePath, const QString &outputDriver, const QgsMeshDatasetGroupMetadata &meta, const QVector< QgsMeshDataBlock > &datasetValues, const QVector< QgsMeshDataBlock > &datasetActive, const QVector< double > &times) override
 Not implemented, always returns true.
 
bool persistDatasetGroup (const QString &outputFilePath, const QString &outputDriver, QgsMeshDatasetSourceInterface *source, int datasetGroupIndex) override
 Not implemented, always returns true.
 
void removeDatasetGroup (int index)
 Removes the dataset group with the local index.
 
void updateTemporalCapabilities ()
 Updates the temporal capabilities.
 
QDomElement writeXml (int groupIndex, QDomDocument &doc, const QgsReadWriteContext &context)
 Writes the store's information in a DOM document.
 
- Public Member Functions inherited from QgsMeshDatasetSourceInterface
 QgsMeshDatasetSourceInterface ()
 
virtual ~QgsMeshDatasetSourceInterface ()=default
 
int datasetCount (QgsMeshDatasetIndex index) const
 Returns number of datasets loaded in the group.
 
QgsMeshDatasetGroupMetadata datasetGroupMetadata (QgsMeshDatasetIndex index) const
 Returns dataset group metadata.
 
QgsMeshDatasetIndex datasetIndexAtTime (const QDateTime &referenceTime, int groupIndex, qint64 time, QgsMeshDataProviderTemporalCapabilities::MatchingTemporalDatasetMethod method) const
 Returns the dataset index of the dataset in a specific dataset group at time from the reference time.
 
QList< QgsMeshDatasetIndexdatasetIndexInTimeInterval (const QDateTime &referenceTime, int groupIndex, qint64 time1, qint64 time2) const
 Returns a list of dataset indexes of the dataset in a specific dataset group that are between time1 and time2 from the reference time.
 
virtual Q_DECL_DEPRECATED bool persistDatasetGroup (const QString &path, const QgsMeshDatasetGroupMetadata &meta, const QVector< QgsMeshDataBlock > &datasetValues, const QVector< QgsMeshDataBlock > &datasetActive, const QVector< double > &times)
 Creates a new dataset group from a data and persists it into a destination path.
 

Additional Inherited Members

- Protected Attributes inherited from QgsMeshDatasetSourceInterface
std::unique_ptr< QgsMeshDataProviderTemporalCapabilitiesmTemporalCapabilities
 

Detailed Description

Class that can be used to store and access extra dataset group, like memory dataset (temporary) Derived from QgsMeshDatasetSourceInterface, this class has same methods as QgsMeshDataProvider to access to the datasets.

Since
QGIS 3.16

Definition at line 36 of file qgsmeshdatasetgroupstore.h.

Member Function Documentation

◆ addDataset()

bool QgsMeshExtraDatasetStore::addDataset ( const QString &  uri)
overridevirtual

Not implemented, always returns false.

Implements QgsMeshDatasetSourceInterface.

Definition at line 733 of file qgsmeshdatasetgroupstore.cpp.

◆ addDatasetGroup()

int QgsMeshExtraDatasetStore::addDatasetGroup ( QgsMeshDatasetGroup datasetGroup)

Adds a dataset group, returns the index of the added dataset group.

Definition at line 683 of file qgsmeshdatasetgroupstore.cpp.

◆ areFacesActive()

QgsMeshDataBlock QgsMeshExtraDatasetStore::areFacesActive ( QgsMeshDatasetIndex  index,
int  faceIndex,
int  count 
) const
overridevirtual

Returns whether the faces are active for particular dataset.

Since
QGIS 3.6

Implements QgsMeshDatasetSourceInterface.

Definition at line 829 of file qgsmeshdatasetgroupstore.cpp.

◆ dataset3dValues()

QgsMesh3DDataBlock QgsMeshExtraDatasetStore::dataset3dValues ( QgsMeshDatasetIndex  index,
int  faceIndex,
int  count 
) const
overridevirtual

Returns N vector/scalar values from the face index from the dataset for 3d stacked meshes.

See QgsMeshDatasetMetadata::isVector() to check if the returned value is vector or scalar

returns invalid block for DataOnFaces and DataOnVertices.

See also
datasetValues
Since
QGIS 3.12

Implements QgsMeshDatasetSourceInterface.

Definition at line 806 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetCount()

int QgsMeshExtraDatasetStore::datasetCount ( int  groupIndex) const
overridevirtual

Returns number of datasets loaded in the group.

Implements QgsMeshDatasetSourceInterface.

Definition at line 749 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetGroup()

QgsMeshDatasetGroup * QgsMeshExtraDatasetStore::datasetGroup ( int  groupIndex) const

Returns a pointer to the dataset group.

Definition at line 725 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetGroupCount()

int QgsMeshExtraDatasetStore::datasetGroupCount ( ) const
overridevirtual

Returns number of datasets groups loaded.

Implements QgsMeshDatasetSourceInterface.

Definition at line 744 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetGroupMetadata()

QgsMeshDatasetGroupMetadata QgsMeshExtraDatasetStore::datasetGroupMetadata ( int  groupIndex) const
overridevirtual

Returns dataset group metadata.

Implements QgsMeshDatasetSourceInterface.

Definition at line 757 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetMetadata()

QgsMeshDatasetMetadata QgsMeshExtraDatasetStore::datasetMetadata ( QgsMeshDatasetIndex  index) const
overridevirtual

Returns dataset metadata.

Implements QgsMeshDatasetSourceInterface.

Definition at line 765 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetRelativeTime()

qint64 QgsMeshExtraDatasetStore::datasetRelativeTime ( QgsMeshDatasetIndex  index) const

Returns the relative times of the dataset index with index, returned value in milliseconds.

Definition at line 712 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetValue()

QgsMeshDatasetValue QgsMeshExtraDatasetStore::datasetValue ( QgsMeshDatasetIndex  index,
int  valueIndex 
) const
overridevirtual

Returns vector/scalar value associated with the index from the dataset To read multiple continuous values, use datasetValues()

See QgsMeshDatasetMetadata::isVector() or QgsMeshDataBlock::type() to check if the returned value is vector or scalar

Returns invalid value for DataOnVolumes

See also
datasetValues

Implements QgsMeshDatasetSourceInterface.

Definition at line 778 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetValues()

QgsMeshDataBlock QgsMeshExtraDatasetStore::datasetValues ( QgsMeshDatasetIndex  index,
int  valueIndex,
int  count 
) const
overridevirtual

Returns N vector/scalar values from the index from the dataset.

See QgsMeshDatasetMetadata::isVector() or QgsMeshDataBlock::type() to check if the returned value is vector or scalar

Returns invalid block for DataOnVolumes. Use QgsMeshLayerUtils::datasetValues() if you need block for any type of data type

Since
QGIS 3.6

Implements QgsMeshDatasetSourceInterface.

Definition at line 792 of file qgsmeshdatasetgroupstore.cpp.

◆ description()

QString QgsMeshExtraDatasetStore::description ( int  groupIndex) const

Returns information related to the dataset group with groupIndex.

Definition at line 717 of file qgsmeshdatasetgroupstore.cpp.

◆ extraDatasets()

QStringList QgsMeshExtraDatasetStore::extraDatasets ( ) const
overridevirtual

Not implemented, always returns empty list.

Implements QgsMeshDatasetSourceInterface.

Definition at line 739 of file qgsmeshdatasetgroupstore.cpp.

◆ hasTemporalCapabilities()

bool QgsMeshExtraDatasetStore::hasTemporalCapabilities ( ) const

Returns whether if the dataset groups have temporal capabilities (a least one dataset group with more than one dataset)

Definition at line 707 of file qgsmeshdatasetgroupstore.cpp.

◆ isFaceActive()

bool QgsMeshExtraDatasetStore::isFaceActive ( QgsMeshDatasetIndex  index,
int  faceIndex 
) const
overridevirtual

Returns whether the face is active for particular dataset.

For example to represent the situation when F1 and F3 are flooded, but F2 is dry, some solvers store water depth on vertices V1-V8 (all non-zero values) and set active flag for F2 to false. V1 -— V2 -— V5--—V7 | F1 | F2 | F3 | V3 -— V4 -— V6--—V8

Implements QgsMeshDatasetSourceInterface.

Definition at line 815 of file qgsmeshdatasetgroupstore.cpp.

◆ persistDatasetGroup() [1/2]

bool QgsMeshExtraDatasetStore::persistDatasetGroup ( const QString &  outputFilePath,
const QString &  outputDriver,
const QgsMeshDatasetGroupMetadata meta,
const QVector< QgsMeshDataBlock > &  datasetValues,
const QVector< QgsMeshDataBlock > &  datasetActive,
const QVector< double > &  times 
)
overridevirtual

Not implemented, always returns true.

Implements QgsMeshDatasetSourceInterface.

Definition at line 842 of file qgsmeshdatasetgroupstore.cpp.

◆ persistDatasetGroup() [2/2]

bool QgsMeshExtraDatasetStore::persistDatasetGroup ( const QString &  outputFilePath,
const QString &  outputDriver,
QgsMeshDatasetSourceInterface source,
int  datasetGroupIndex 
)
overridevirtual

Not implemented, always returns true.

Implements QgsMeshDatasetSourceInterface.

Definition at line 858 of file qgsmeshdatasetgroupstore.cpp.

◆ removeDatasetGroup()

void QgsMeshExtraDatasetStore::removeDatasetGroup ( int  index)

Removes the dataset group with the local index.

Definition at line 698 of file qgsmeshdatasetgroupstore.cpp.

◆ updateTemporalCapabilities()

void QgsMeshExtraDatasetStore::updateTemporalCapabilities ( )

Updates the temporal capabilities.

Definition at line 878 of file qgsmeshdatasetgroupstore.cpp.

◆ writeXml()

QDomElement QgsMeshExtraDatasetStore::writeXml ( int  groupIndex,
QDomDocument &  doc,
const QgsReadWriteContext context 
)

Writes the store's information in a DOM document.

Definition at line 870 of file qgsmeshdatasetgroupstore.cpp.


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