Class: QgsMeshRelativeHeightAveragingMethod

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

The range is defined in the same length units as defined by model (e.g. meters)

If countedFromTop(), the method represents averaging based on depth below surface. For example one can pull out results for between 6 to 12 meters below the water surface - depth from 6m to 12m. The depth will be truncated at the bed level.

If not countedFromTop(), the method represents averaging based on height above bed level. For example one can pull out results for between 6 to 12 meters above the bed - height from 6m to 12m. The height will be truncated at the bed level.

Added in version 3.12.

Class Hierarchy

Inheritance diagram of qgis.core.QgsMeshRelativeHeightAveragingMethod

Base classes

QgsMesh3DAveragingMethod

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

Methods

countedFromTop

Returns whether the start and end vertical levels are relative to top (surface) or bottom (bed) level

endHeight

Returns ending depth/height.

startHeight

Returns starting depth/height.

class qgis.core.QgsMeshRelativeHeightAveragingMethod[source]

Bases: QgsMesh3DAveragingMethod

__init__()

Constructs default depth averaging method

__init__(startHeight: float, endHeight: float, countedFromTop: bool)

Constructs the depth/height averaging method

Parameters:
  • startHeight (float) – starting depth/height, higher or equal than 0

  • endHeight (float) – ending depth/height, higher or equal than startDepth

  • countedFromTop (bool) – if True, the startLength and endLength is relative to surface (0 is surface level). if False, the startLength and endLength is relative to bed (0 is bed level).

__init__(a0: QgsMeshRelativeHeightAveragingMethod)
Parameters:

a0 (QgsMeshRelativeHeightAveragingMethod)

countedFromTop(self) bool[source]

Returns whether the start and end vertical levels are relative to top (surface) or bottom (bed) level

Return type:

bool

endHeight(self) float[source]

Returns ending depth/height.

Always higher or equal than startLength()

Return type:

float

startHeight(self) float[source]

Returns starting depth/height.

Always lower or equal than endLength()

Return type:

float