Subgroup: Mesh

Class: QgsMeshDatasetSourceInterface

class qgis.core.QgsMeshDatasetSourceInterface

Bases: sip.wrapper

Interface for mesh datasets and dataset groups

Dataset is a collection of vector or scalar values on vertices or faces of the mesh. Based on the underlying data provider/format, whole dataset is either stored in memory or read on demand

Datasets are grouped in the dataset groups. A dataset group represents a measured quantity (e.g. depth or wind speed), dataset represents values of the quantity in a particular time.

Note

The API is considered EXPERIMENTAL and can be changed without a notice

New in version 3.2: Methods

addDataset Associate dataset with the mesh
datasetCount Returns number of datasets loaded in the group
datasetGroupCount Returns number of datasets groups loaded
datasetGroupMetadata Returns dataset group metadata
datasetMetadata Returns dataset metadata
datasetValue Returns vector/scalar value associated with the index from the dataset
extraDatasets Returns list of additional dataset file URIs added using addDataset() calls.
isFaceActive Returns whether the face is active for particular dataset

Signals

Attributes

addDataset(self, uri: str) → bool

Associate dataset with the mesh

emits dataChanged when successful

datasetCount(self, groupIndex: int) → int

Returns number of datasets loaded in the group

datasetCount(self, index: QgsMeshDatasetIndex) -> int Returns number of datasets loaded in the group

datasetGroupCount(self) → int

Returns number of datasets groups loaded

datasetGroupMetadata(self, groupIndex: int) → QgsMeshDatasetGroupMetadata

Returns dataset group metadata

datasetGroupMetadata(self, index: QgsMeshDatasetIndex) -> QgsMeshDatasetGroupMetadata Returns dataset group metadata

datasetMetadata(self, index: QgsMeshDatasetIndex) → QgsMeshDatasetMetadata

Returns dataset metadata

datasetValue(self, index: QgsMeshDatasetIndex, valueIndex: int) → QgsMeshDatasetValue

Returns vector/scalar value associated with the index from the dataset

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

extraDatasets(self) → List[str]

Returns list of additional dataset file URIs added using addDataset() calls.

isFaceActive(self, index: QgsMeshDatasetIndex, faceIndex: int) → bool

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