Class: QgsMesh3DAveragingMethod

Abstract class to interpolate 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.

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 averages the values based on range defined relative to bed elevation or surface (when countedFromTop())

QgsMeshSigmaAveragingMethod

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

Methods

calculate

Calculated 2d block values from 3d stacked mesh values

clone

Clone the instance

equals

Returns whether two methods equal

method

Returns type of averaging method

readXml

Reads configuration from the given DOM element

writeXml

Writes configuration to a new DOM element

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

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]

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

Returns whether two methods equal

Parameters:
Return type:

bool

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

readXml(self, elem: QDomElement)[source]

Reads configuration from the given DOM element

Parameters:

elem (QDomElement)

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

Writes configuration to a new DOM element

Parameters:

doc (QDomDocument)

Return type:

QDomElement