Class: QgsMeshDatasetGroup

Abstract class that represents a dataset group.

Added in version 3.16.

Note

This is an abstract class, with methods which must be implemented by a subclass.

The following methods must be implemented: dataset(), datasetCount(), datasetMetadata(), initialize(), type(), writeXml()

Class Hierarchy

Inheritance diagram of qgis.core.QgsMeshDatasetGroup

Subclasses

QgsMeshZValueDatasetGroup

Convenience class that can be used to obtain a dataset group on vertices that represents the Z value of the mesh vertices.

Abstract Methods

dataset

Returns the dataset with index

datasetCount

Returns the count of datasets in the group

datasetMetadata

Returns the metadata of the dataset with index datasetIndex

initialize

Initialize the dataset group

type

Returns the type of dataset group

writeXml

Write dataset group information in a DOM element

Methods

addExtraMetadata

Adds extra metadata to the group

calculateStatistic

Calculates the statistics (minimum and maximum)

checkValueCountPerDataset

Returns whether all the datasets contain count values

dataType

Returns the data type of the dataset group

extraMetadata

Returns all the extra metadata of the group

groupMetadata

Returns the metadata of the dataset group

isScalar

Returns whether the group contain scalar values

maximum

Returns the maximum value of the whole dataset group

minimum

Returns the minimum value of the whole dataset group

name

Returns the name of the dataset group

setDataType

Sets the data type of the dataset group

setIsScalar

Sets whether the group contain scalar values

setMinimumMaximum

Overrides the minimum and the maximum value of the whole dataset group

setName

Sets the name of the dataset group

setReferenceTime

Sets the reference time of the dataset group

setStatisticObsolete

Sets statistic obsolete, that means statistic will be recalculated when requested

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsMeshDatasetGroup. See the FAQ for more details.

datasetGroupNamesDependentOn

Returns the dataset group variable name which this dataset group depends on

description

Returns some information about the dataset group

Attributes

Memory

Persistent

Unknown

Virtual

class qgis.core.QgsMeshDatasetGroup[source]

Bases: object

__init__()
__init__(name: str | None)

Constructor with the name of the dataset group

Parameters:

name (Optional[str])

__init__(name: str | None, dataType: QgsMeshDatasetGroupMetadata.DataType)

Constructor with the name of the dataset group and the dataTYpe

Parameters:
__init__(a0: QgsMeshDatasetGroup)
Parameters:

a0 (QgsMeshDatasetGroup)

Memory = 2
Persistent = 1
class Type

Bases: int

Unknown = 0
Virtual = 3
addExtraMetadata(self, key: str | None, value: str | None)[source]

Adds extra metadata to the group

Parameters:
  • key (Optional[str])

  • value (Optional[str])

calculateStatistic(self)[source]

Calculates the statistics (minimum and maximum)

checkValueCountPerDataset(self, count: int) bool[source]

Returns whether all the datasets contain count values

Parameters:

count (int)

Return type:

bool

dataType(self) QgsMeshDatasetGroupMetadata.DataType[source]

Returns the data type of the dataset group

Return type:

QgsMeshDatasetGroupMetadata.DataType

abstract dataset(self, index: int) QgsMeshDataset | None[source]

Returns the dataset with index

Parameters:

index (int)

Return type:

Optional[QgsMeshDataset]

abstract datasetCount(self) int[source]

Returns the count of datasets in the group

Return type:

int

virtual datasetGroupNamesDependentOn(self) List[str][source]

Returns the dataset group variable name which this dataset group depends on

Return type:

List[str]

abstract datasetMetadata(self, datasetIndex: int) QgsMeshDatasetMetadata[source]

Returns the metadata of the dataset with index datasetIndex

Parameters:

datasetIndex (int)

Return type:

QgsMeshDatasetMetadata

virtual description(self) str[source]

Returns some information about the dataset group

Return type:

str

extraMetadata(self) Dict[str, str]

Returns all the extra metadata of the group

Return type:

Dict[str, str]

groupMetadata(self) QgsMeshDatasetGroupMetadata[source]

Returns the metadata of the dataset group

Return type:

QgsMeshDatasetGroupMetadata

abstract initialize(self)[source]

Initialize the dataset group

isScalar(self) bool[source]

Returns whether the group contain scalar values

Return type:

bool

maximum(self) float[source]

Returns the maximum value of the whole dataset group

Return type:

float

minimum(self) float[source]

Returns the minimum value of the whole dataset group

Return type:

float

name(self) str[source]

Returns the name of the dataset group

Return type:

str

setDataType(self, dataType: QgsMeshDatasetGroupMetadata.DataType)[source]

Sets the data type of the dataset group

Parameters:

dataType (QgsMeshDatasetGroupMetadata.DataType)

setIsScalar(self, isScalar: bool)[source]

Sets whether the group contain scalar values

Parameters:

isScalar (bool)

setMinimumMaximum(self, min: float, max: float)[source]

Overrides the minimum and the maximum value of the whole dataset group

Parameters:
  • min (float)

  • max (float)

setName(self, name: str | None)[source]

Sets the name of the dataset group

Parameters:

name (Optional[str])

setReferenceTime(self, referenceTime: QDateTime | datetime.datetime)[source]

Sets the reference time of the dataset group

Parameters:

referenceTime (Union[QDateTime, datetime.datetime])

setStatisticObsolete(self)[source]

Sets statistic obsolete, that means statistic will be recalculated when requested

abstract type(self) QgsMeshDatasetGroup.Type[source]

Returns the type of dataset group

Return type:

QgsMeshDatasetGroup.Type

abstract writeXml(self, doc: QDomDocument, context: QgsReadWriteContext) QDomElement[source]

Write dataset group information in a DOM element

Parameters:
Return type:

QDomElement