QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
|
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>
Public Member Functions | |
bool | addDataset (const QString &uri) override |
Not implemented, always returns false. More... | |
int | addDatasetGroup (QgsMeshDatasetGroup *datasetGroup) |
Adds a dataset group, returns the index of the added dataset group. More... | |
QgsMeshDataBlock | areFacesActive (QgsMeshDatasetIndex index, int faceIndex, int count) const override |
Returns whether the faces are active for particular dataset. More... | |
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. More... | |
int | datasetCount (int groupIndex) const override |
Returns number of datasets loaded in the group. More... | |
QgsMeshDatasetGroup * | datasetGroup (int groupIndex) const |
Returns a pointer to the dataset group. More... | |
int | datasetGroupCount () const override |
Returns number of datasets groups loaded. More... | |
QgsMeshDatasetGroupMetadata | datasetGroupMetadata (int groupIndex) const override |
Returns dataset group metadata. More... | |
QgsMeshDatasetMetadata | datasetMetadata (QgsMeshDatasetIndex index) const override |
Returns dataset metadata. More... | |
qint64 | datasetRelativeTime (QgsMeshDatasetIndex index) const |
Returns the relative times of the dataset index with index, returned value in milliseconds. More... | |
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() More... | |
QgsMeshDataBlock | datasetValues (QgsMeshDatasetIndex index, int valueIndex, int count) const override |
Returns N vector/scalar values from the index from the dataset. More... | |
QString | description (int groupIndex) const |
Returns information related to the dataset group with groupIndex. More... | |
QStringList | extraDatasets () const override |
Not implemented, always returns empty list. More... | |
bool | hasTemporalCapabilities () const |
Returns whether if the dataset groups have temporal capabilities (a least one dataset group with more than one dataset) More... | |
bool | isFaceActive (QgsMeshDatasetIndex index, int faceIndex) const override |
Returns whether the face is active for particular dataset. More... | |
bool | persistDatasetGroup (const QString &outputFilePath, const QString &outputDriver, const QgsMeshDatasetGroupMetadata &meta, const QVector< QgsMeshDataBlock > &datasetValues, const QVector< QgsMeshDataBlock > &datasetActive, const QVector< double > ×) override |
Not implemented, always returns true. More... | |
bool | persistDatasetGroup (const QString &outputFilePath, const QString &outputDriver, QgsMeshDatasetSourceInterface *source, int datasetGroupIndex) override |
Not implemented, always returns true. More... | |
void | removeDatasetGroup (int index) |
Removes the dataset group with the local index. More... | |
void | updateTemporalCapabilities () |
Updates the temporal capabilities. More... | |
QDomElement | writeXml (int groupIndex, QDomDocument &doc, const QgsReadWriteContext &context) |
Writes the store's information in a DOM document. More... | |
Public Member Functions inherited from QgsMeshDatasetSourceInterface | |
QgsMeshDatasetSourceInterface () | |
virtual | ~QgsMeshDatasetSourceInterface ()=default |
Dtor. More... | |
virtual bool | addDataset (const QString &uri)=0 |
Associate dataset with the mesh. More... | |
virtual QgsMeshDataBlock | areFacesActive (QgsMeshDatasetIndex index, int faceIndex, int count) const =0 |
Returns whether the faces are active for particular dataset. More... | |
virtual QgsMesh3dDataBlock | dataset3dValues (QgsMeshDatasetIndex index, int faceIndex, int count) const =0 |
Returns N vector/scalar values from the face index from the dataset for 3d stacked meshes. More... | |
virtual int | datasetCount (int groupIndex) const =0 |
Returns number of datasets loaded in the group. More... | |
int | datasetCount (QgsMeshDatasetIndex index) const |
Returns number of datasets loaded in the group. More... | |
virtual int | datasetGroupCount () const =0 |
Returns number of datasets groups loaded. More... | |
virtual QgsMeshDatasetGroupMetadata | datasetGroupMetadata (int groupIndex) const =0 |
Returns dataset group metadata. More... | |
QgsMeshDatasetGroupMetadata | datasetGroupMetadata (QgsMeshDatasetIndex index) const |
Returns dataset group metadata. More... | |
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. More... | |
QList< QgsMeshDatasetIndex > | datasetIndexInTimeInterval (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. More... | |
virtual QgsMeshDatasetMetadata | datasetMetadata (QgsMeshDatasetIndex index) const =0 |
Returns dataset metadata. More... | |
virtual QgsMeshDatasetValue | datasetValue (QgsMeshDatasetIndex index, int valueIndex) const =0 |
Returns vector/scalar value associated with the index from the dataset To read multiple continuous values, use datasetValues() More... | |
virtual QgsMeshDataBlock | datasetValues (QgsMeshDatasetIndex index, int valueIndex, int count) const =0 |
Returns N vector/scalar values from the index from the dataset. More... | |
virtual QStringList | extraDatasets () const =0 |
Returns list of additional dataset file URIs added using addDataset() calls. More... | |
virtual bool | isFaceActive (QgsMeshDatasetIndex index, int faceIndex) const =0 |
Returns whether the face is active for particular dataset. More... | |
virtual bool | persistDatasetGroup (const QString &outputFilePath, const QString &outputDriver, const QgsMeshDatasetGroupMetadata &meta, const QVector< QgsMeshDataBlock > &datasetValues, const QVector< QgsMeshDataBlock > &datasetActive, const QVector< double > ×)=0 |
Creates a new dataset group from a data and persists it into a destination path. More... | |
virtual bool | persistDatasetGroup (const QString &outputFilePath, const QString &outputDriver, QgsMeshDatasetSourceInterface *source, int datasetGroupIndex)=0 |
Saves a an existing dataset group provided by source to a file with a specified driver. More... | |
virtual Q_DECL_DEPRECATED bool | persistDatasetGroup (const QString &path, const QgsMeshDatasetGroupMetadata &meta, const QVector< QgsMeshDataBlock > &datasetValues, const QVector< QgsMeshDataBlock > &datasetActive, const QVector< double > ×) |
Creates a new dataset group from a data and persists it into a destination path. More... | |
Additional Inherited Members | |
Protected Attributes inherited from QgsMeshDatasetSourceInterface | |
std::unique_ptr< QgsMeshDataProviderTemporalCapabilities > | mTemporalCapabilities |
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.
Definition at line 36 of file qgsmeshdatasetgroupstore.h.
|
overridevirtual |
Not implemented, always returns false.
Implements QgsMeshDatasetSourceInterface.
Definition at line 722 of file qgsmeshdatasetgroupstore.cpp.
int QgsMeshExtraDatasetStore::addDatasetGroup | ( | QgsMeshDatasetGroup * | datasetGroup | ) |
Adds a dataset group, returns the index of the added dataset group.
Definition at line 672 of file qgsmeshdatasetgroupstore.cpp.
|
overridevirtual |
Returns whether the faces are active for particular dataset.
Implements QgsMeshDatasetSourceInterface.
Definition at line 818 of file qgsmeshdatasetgroupstore.cpp.
|
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.
Implements QgsMeshDatasetSourceInterface.
Definition at line 795 of file qgsmeshdatasetgroupstore.cpp.
|
overridevirtual |
Returns number of datasets loaded in the group.
Implements QgsMeshDatasetSourceInterface.
Definition at line 738 of file qgsmeshdatasetgroupstore.cpp.
QgsMeshDatasetGroup * QgsMeshExtraDatasetStore::datasetGroup | ( | int | groupIndex | ) | const |
Returns a pointer to the dataset group.
Definition at line 714 of file qgsmeshdatasetgroupstore.cpp.
|
overridevirtual |
Returns number of datasets groups loaded.
Implements QgsMeshDatasetSourceInterface.
Definition at line 733 of file qgsmeshdatasetgroupstore.cpp.
|
overridevirtual |
Returns dataset group metadata.
Implements QgsMeshDatasetSourceInterface.
Definition at line 746 of file qgsmeshdatasetgroupstore.cpp.
|
overridevirtual |
Returns dataset metadata.
Implements QgsMeshDatasetSourceInterface.
Definition at line 754 of file qgsmeshdatasetgroupstore.cpp.
qint64 QgsMeshExtraDatasetStore::datasetRelativeTime | ( | QgsMeshDatasetIndex | index | ) | const |
Returns the relative times of the dataset index with index, returned value in milliseconds.
Definition at line 701 of file qgsmeshdatasetgroupstore.cpp.
|
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
Implements QgsMeshDatasetSourceInterface.
Definition at line 767 of file qgsmeshdatasetgroupstore.cpp.
|
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
Implements QgsMeshDatasetSourceInterface.
Definition at line 781 of file qgsmeshdatasetgroupstore.cpp.
QString QgsMeshExtraDatasetStore::description | ( | int | groupIndex | ) | const |
Returns information related to the dataset group with groupIndex.
Definition at line 706 of file qgsmeshdatasetgroupstore.cpp.
|
overridevirtual |
Not implemented, always returns empty list.
Implements QgsMeshDatasetSourceInterface.
Definition at line 728 of file qgsmeshdatasetgroupstore.cpp.
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 696 of file qgsmeshdatasetgroupstore.cpp.
|
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 804 of file qgsmeshdatasetgroupstore.cpp.
|
overridevirtual |
Not implemented, always returns true.
Implements QgsMeshDatasetSourceInterface.
Definition at line 831 of file qgsmeshdatasetgroupstore.cpp.
|
overridevirtual |
Not implemented, always returns true.
Implements QgsMeshDatasetSourceInterface.
Definition at line 847 of file qgsmeshdatasetgroupstore.cpp.
void QgsMeshExtraDatasetStore::removeDatasetGroup | ( | int | index | ) |
Removes the dataset group with the local index.
Definition at line 687 of file qgsmeshdatasetgroupstore.cpp.
void QgsMeshExtraDatasetStore::updateTemporalCapabilities | ( | ) |
Updates the temporal capabilities.
Definition at line 867 of file qgsmeshdatasetgroupstore.cpp.
QDomElement QgsMeshExtraDatasetStore::writeXml | ( | int | groupIndex, |
QDomDocument & | doc, | ||
const QgsReadWriteContext & | context | ||
) |
Writes the store's information in a DOM document.
Definition at line 859 of file qgsmeshdatasetgroupstore.cpp.