QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
Relative height averaging method averages the values based on range defined relative to bed elevation or surface (when countedFromTop()) More...
#include <qgsmesh3daveraging.h>
Public Member Functions | |
QgsMeshRelativeHeightAveragingMethod () | |
Constructs default depth averaging method. | |
QgsMeshRelativeHeightAveragingMethod (double startHeight, double endHeight, bool countedFromTop) | |
Constructs the depth/height averaging method. | |
~QgsMeshRelativeHeightAveragingMethod () override | |
QgsMesh3DAveragingMethod * | clone () 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 QgsMesh3DAveragingMethod * | createFromXml (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. | |
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.
Definition at line 304 of file qgsmesh3daveraging.h.
QgsMeshRelativeHeightAveragingMethod::QgsMeshRelativeHeightAveragingMethod | ( | ) |
Constructs default depth averaging method.
Definition at line 482 of file qgsmesh3daveraging.cpp.
QgsMeshRelativeHeightAveragingMethod::QgsMeshRelativeHeightAveragingMethod | ( | double | startHeight, |
double | endHeight, | ||
bool | countedFromTop | ||
) |
Constructs the depth/height averaging method.
startHeight | starting depth/height, higher or equal than 0 |
endHeight | ending depth/height, higher or equal than startDepth |
countedFromTop | 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). |
Definition at line 487 of file qgsmesh3daveraging.cpp.
|
overridedefault |
|
overridevirtual |
Clone the instance.
Implements QgsMesh3DAveragingMethod.
Definition at line 535 of file qgsmesh3daveraging.cpp.
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.
double QgsMeshRelativeHeightAveragingMethod::endHeight | ( | ) | const |
Returns ending depth/height.
Always higher or equal than startLength()
Definition at line 545 of file qgsmesh3daveraging.cpp.
|
overridevirtual |
Returns whether method equals to other.
Implements QgsMesh3DAveragingMethod.
Definition at line 523 of file qgsmesh3daveraging.cpp.
|
overridevirtual |
Reads configuration from the given DOM element.
Implements QgsMesh3DAveragingMethod.
Definition at line 509 of file qgsmesh3daveraging.cpp.
double QgsMeshRelativeHeightAveragingMethod::startHeight | ( | ) | const |
Returns starting depth/height.
Always lower or equal than endLength()
Definition at line 540 of file qgsmesh3daveraging.cpp.
|
overridevirtual |
Writes configuration to a new DOM element.
Implements QgsMesh3DAveragingMethod.
Definition at line 501 of file qgsmesh3daveraging.cpp.