QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsMeshRelativeHeightAveragingMethod Class Reference

Relative height averaging method averages the values based on range defined relative to bed elevation or surface (when countedFromTop()) More...

#include <qgsmesh3daveraging.h>

Inheritance diagram for QgsMeshRelativeHeightAveragingMethod:
Inheritance graph
[legend]

Public Member Functions

 QgsMeshRelativeHeightAveragingMethod ()
 Constructs default depth averaging method.
 
 QgsMeshRelativeHeightAveragingMethod (double startHeight, double endHeight, bool countedFromTop)
 Constructs the depth/height averaging method.
 
 ~QgsMeshRelativeHeightAveragingMethod () override
 
QgsMesh3DAveragingMethodclone () const override
 Clone the instance.
 
bool countedFromTop () const
 Returns whether the start and end vertical levels are relative to top (surface) or bottom (bed) level.
 
double endHeight () const
 Returns ending depth/height.
 
bool equals (const QgsMesh3DAveragingMethod *other) const override
 Returns whether method equals to other.
 
void readXml (const QDomElement &elem) override
 Reads configuration from the given DOM element.
 
double startHeight () const
 Returns starting depth/height.
 
QDomElement writeXml (QDomDocument &doc) const override
 Writes configuration to a new DOM element.
 
- Public Member Functions inherited from QgsMesh3DAveragingMethod
 QgsMesh3DAveragingMethod (Method method)
 Ctor.
 
virtual ~QgsMesh3DAveragingMethod ()=default
 
QgsMeshDataBlock calculate (const QgsMesh3DDataBlock &block3d, QgsFeedback *feedback=nullptr) const
 Calculated 2d block values from 3d stacked mesh values.
 
Method method () const
 Returns type of averaging method.
 

Additional Inherited Members

- Public Types inherited from QgsMesh3DAveragingMethod
enum  Method { MultiLevelsAveragingMethod = 0 , SigmaAveragingMethod , RelativeHeightAveragingMethod , ElevationAveragingMethod }
 Type of averaging method. More...
 
- Static Public Member Functions inherited from QgsMesh3DAveragingMethod
static QgsMesh3DAveragingMethodcreateFromXml (const QDomElement &elem)
 Creates the instance from XML by calling readXml of derived classes.
 
static bool equals (const QgsMesh3DAveragingMethod *a, const QgsMesh3DAveragingMethod *b)
 Returns whether two methods equal.
 

Detailed Description

Relative height averaging method averages the values based on range defined relative to bed elevation or surface (when countedFromTop())

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.

Since
QGIS 3.12

Definition at line 304 of file qgsmesh3daveraging.h.

Constructor & Destructor Documentation

◆ QgsMeshRelativeHeightAveragingMethod() [1/2]

QgsMeshRelativeHeightAveragingMethod::QgsMeshRelativeHeightAveragingMethod ( )

Constructs default depth averaging method.

Definition at line 482 of file qgsmesh3daveraging.cpp.

◆ QgsMeshRelativeHeightAveragingMethod() [2/2]

QgsMeshRelativeHeightAveragingMethod::QgsMeshRelativeHeightAveragingMethod ( double  startHeight,
double  endHeight,
bool  countedFromTop 
)

Constructs the depth/height averaging method.

Parameters
startHeightstarting depth/height, higher or equal than 0
endHeightending depth/height, higher or equal than startDepth
countedFromTopif 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).

Definition at line 487 of file qgsmesh3daveraging.cpp.

◆ ~QgsMeshRelativeHeightAveragingMethod()

QgsMeshRelativeHeightAveragingMethod::~QgsMeshRelativeHeightAveragingMethod ( )
overridedefault

Member Function Documentation

◆ clone()

QgsMesh3DAveragingMethod * QgsMeshRelativeHeightAveragingMethod::clone ( ) const
overridevirtual

Clone the instance.

Implements QgsMesh3DAveragingMethod.

Definition at line 535 of file qgsmesh3daveraging.cpp.

◆ countedFromTop()

bool QgsMeshRelativeHeightAveragingMethod::countedFromTop ( ) const

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

Definition at line 574 of file qgsmesh3daveraging.cpp.

◆ endHeight()

double QgsMeshRelativeHeightAveragingMethod::endHeight ( ) const

Returns ending depth/height.

Always higher or equal than startLength()

Definition at line 545 of file qgsmesh3daveraging.cpp.

◆ equals()

bool QgsMeshRelativeHeightAveragingMethod::equals ( const QgsMesh3DAveragingMethod other) const
overridevirtual

Returns whether method equals to other.

Implements QgsMesh3DAveragingMethod.

Definition at line 523 of file qgsmesh3daveraging.cpp.

◆ readXml()

void QgsMeshRelativeHeightAveragingMethod::readXml ( const QDomElement &  elem)
overridevirtual

Reads configuration from the given DOM element.

Implements QgsMesh3DAveragingMethod.

Definition at line 509 of file qgsmesh3daveraging.cpp.

◆ startHeight()

double QgsMeshRelativeHeightAveragingMethod::startHeight ( ) const

Returns starting depth/height.

Always lower or equal than endLength()

Definition at line 540 of file qgsmesh3daveraging.cpp.

◆ writeXml()

QDomElement QgsMeshRelativeHeightAveragingMethod::writeXml ( QDomDocument &  doc) const
overridevirtual

Writes configuration to a new DOM element.

Implements QgsMesh3DAveragingMethod.

Definition at line 501 of file qgsmesh3daveraging.cpp.


The documentation for this class was generated from the following files: