Class: QgsMesh3DAveragingMethod

Abstract class for interpolating 3d stacked mesh data to 2d data.

Note

In QGIS 3.34 this class was renamed from QgsMesh3dAveragingMethod to QgsMesh3DAveragingMethod. The old QgsMesh3dAveragingMethod name remains available in PyQGIS for compatibility.

Added in version 3.12.

Note

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

The following methods must be implemented: clone(), equals(), readXml(), writeXml()

Class Hierarchy

Inheritance diagram of qgis.core.QgsMesh3DAveragingMethod

Subclasses

QgsMeshElevationAveragingMethod

Elevation averaging method averages the values based on range defined absolute value to the model’s datum.

QgsMeshMultiLevelsAveragingMethod

Multi level averaging method specifies limits of vertical layers from the top layer down or reversed.

QgsMeshRelativeHeightAveragingMethod

Relative height averaging method which averages the values based on range defined relative to bed elevation or surface.

QgsMeshSigmaAveragingMethod

Sigma averages over the values between 0 (bed level) and 1 (surface).

Abstract Methods

clone

Clone the instance

equals

Returns whether two methods equal

readXml

Reads configuration from the given DOM element

writeXml

Writes configuration to a new DOM element

Methods

calculate

Calculated 2d block values from 3d stacked mesh values

method

Returns type of averaging method

Static Methods

createFromXml

Creates the instance from XML by calling readXml of derived classes

Attributes

ElevationAveragingMethod

MultiLevelsAveragingMethod

RelativeHeightAveragingMethod

SigmaAveragingMethod

class qgis.core.QgsMesh3DAveragingMethod[source]

Bases: object

__init__(method: QgsMesh3DAveragingMethod.Method)

Ctor

Parameters:

method (QgsMesh3DAveragingMethod.Method)

__init__(a0: QgsMesh3DAveragingMethod)
Parameters:

a0 (QgsMesh3DAveragingMethod)

ElevationAveragingMethod = 3
class Method

Bases: int

MultiLevelsAveragingMethod = 0
RelativeHeightAveragingMethod = 2
SigmaAveragingMethod = 1
calculate(self, block3d: QgsMesh3DDataBlock, feedback: QgsFeedback | None = None) QgsMeshDataBlock[source]

Calculated 2d block values from 3d stacked mesh values

Parameters:
Return type:

QgsMeshDataBlock

abstract clone(self) QgsMesh3DAveragingMethod | None[source]

Clone the instance

Return type:

Optional[QgsMesh3DAveragingMethod]

static createFromXml(elem: QDomElement) QgsMesh3DAveragingMethod | None[source]

Creates the instance from XML by calling readXml of derived classes

Parameters:

elem (QDomElement)

Return type:

Optional[QgsMesh3DAveragingMethod]

abstract equals(a: QgsMesh3DAveragingMethod | None, b: QgsMesh3DAveragingMethod | None) bool[source]

Returns whether two methods equal

Parameters:
Return type:

bool

abstract equals(self, other: QgsMesh3DAveragingMethod | None) bool[source]

Returns whether method equals to other

Parameters:

other (Optional[QgsMesh3DAveragingMethod])

Return type:

bool

method(self) QgsMesh3DAveragingMethod.Method[source]

Returns type of averaging method

Return type:

QgsMesh3DAveragingMethod.Method

abstract readXml(self, elem: QDomElement)[source]

Reads configuration from the given DOM element

Parameters:

elem (QDomElement)

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

Writes configuration to a new DOM element

Parameters:

doc (QDomDocument)

Return type:

QDomElement