QGIS API Documentation  3.14.0-Pi (9f7028fd23)
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
QgsRasterMinMaxOrigin Class Reference

#include <qgsrasterminmaxorigin.h>

Public Types

enum  Extent { WholeRaster, CurrentCanvas, UpdatedCanvas }
 This enumerator describes the extent used to compute min/max values. More...
 
enum  Limits { None, MinMax, StdDev, CumulativeCut }
 This enumerator describes the limits used to compute min/max values. More...
 
enum  StatAccuracy { Exact, Estimated }
 This enumerator describes the accuracy used to compute statistics. More...
 

Public Member Functions

 QgsRasterMinMaxOrigin ()
 Default constructor. More...
 
double cumulativeCutLower () const
 Returns the lower bound of cumulative cut method (between 0 and 1). More...
 
double cumulativeCutUpper () const
 Returns the upper bound of cumulative cut method (between 0 and 1). More...
 
QgsRasterMinMaxOrigin::Extent extent () const
 Returns the raster extent. More...
 
QgsRasterMinMaxOrigin::Limits limits () const
 Returns the raster limits. More...
 
bool operator== (const QgsRasterMinMaxOrigin &other) const
 Equality operator. More...
 
void readXml (const QDomElement &elem)
 Deserialize object. More...
 
void setCumulativeCutLower (double val)
 Sets the lower bound of cumulative cut method (between 0 and 1). More...
 
void setCumulativeCutUpper (double val)
 Sets the upper bound of cumulative cut method (between 0 and 1). More...
 
void setExtent (QgsRasterMinMaxOrigin::Extent extent)
 Sets the extent. More...
 
void setLimits (QgsRasterMinMaxOrigin::Limits limits)
 Sets the limits. More...
 
void setStatAccuracy (QgsRasterMinMaxOrigin::StatAccuracy accuracy)
 Sets the statistics accuracy. More...
 
void setStdDevFactor (double val)
 Sets the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ]. More...
 
QgsRasterMinMaxOrigin::StatAccuracy statAccuracy () const
 Returns the raster statistic accuracy. More...
 
double stdDevFactor () const
 Returns the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ]. More...
 
void writeXml (QDomDocument &doc, QDomElement &parentElem) const
 Serialize object. More...
 

Static Public Member Functions

static QgsRasterMinMaxOrigin::Extent extentFromString (const QString &extent)
 Deserialize Extent. More...
 
static QString extentString (QgsRasterMinMaxOrigin::Extent extent)
 Returns a string to serialize Extent. More...
 
static Limits limitsFromString (const QString &limits)
 Deserialize Limits. More...
 
static QString limitsString (Limits limits)
 Returns a string to serialize Limits. More...
 
static QgsRasterMinMaxOrigin::StatAccuracy statAccuracyFromString (const QString &accuracy)
 Deserialize StatAccuracy. More...
 
static QString statAccuracyString (QgsRasterMinMaxOrigin::StatAccuracy accuracy)
 Returns a string to serialize StatAccuracy. More...
 

Static Public Attributes

static constexpr double CUMULATIVE_CUT_LOWER = 0.02
 Default cumulative cut lower limit. More...
 
static constexpr double CUMULATIVE_CUT_UPPER = 0.98
 Default cumulative cut upper limit. More...
 
static constexpr double DEFAULT_STDDEV_FACTOR = 2.0
 Default standard deviation factor. More...
 

Detailed Description

This class describes the origin of min/max values. It does not store by itself the min/max values.

Since
QGIS 3.0

Definition at line 33 of file qgsrasterminmaxorigin.h.

Member Enumeration Documentation

◆ Extent

This enumerator describes the extent used to compute min/max values.

Enumerator
WholeRaster 

Whole raster is used to compute statistics.

CurrentCanvas 

Current extent of the canvas (at the time of computation) is used to compute statistics.

UpdatedCanvas 

Constantly updated extent of the canvas is used to compute statistics.

Definition at line 81 of file qgsrasterminmaxorigin.h.

◆ Limits

This enumerator describes the limits used to compute min/max values.

Enumerator
None 

User defined.

MinMax 

Real min-max values.

StdDev 

Range is [ mean - stdDevFactor() * stddev, mean + stdDevFactor() * stddev ].

CumulativeCut 

Range is [ min + cumulativeCutLower() * (max - min), min + cumulativeCutUpper() * (max - min) ].

Definition at line 71 of file qgsrasterminmaxorigin.h.

◆ StatAccuracy

This enumerator describes the accuracy used to compute statistics.

Enumerator
Exact 

Exact statistics.

Estimated 

Approximated statistics.

Definition at line 92 of file qgsrasterminmaxorigin.h.

Constructor & Destructor Documentation

◆ QgsRasterMinMaxOrigin()

QgsRasterMinMaxOrigin::QgsRasterMinMaxOrigin ( )

Default constructor.

Definition at line 25 of file qgsrasterminmaxorigin.cpp.

Member Function Documentation

◆ cumulativeCutLower()

double QgsRasterMinMaxOrigin::cumulativeCutLower ( ) const
inline

Returns the lower bound of cumulative cut method (between 0 and 1).

Definition at line 118 of file qgsrasterminmaxorigin.h.

◆ cumulativeCutUpper()

double QgsRasterMinMaxOrigin::cumulativeCutUpper ( ) const
inline

Returns the upper bound of cumulative cut method (between 0 and 1).

Definition at line 121 of file qgsrasterminmaxorigin.h.

◆ extent()

QgsRasterMinMaxOrigin::Extent QgsRasterMinMaxOrigin::extent ( ) const
inline

Returns the raster extent.

Definition at line 112 of file qgsrasterminmaxorigin.h.

◆ extentFromString()

QgsRasterMinMaxOrigin::Extent QgsRasterMinMaxOrigin::extentFromString ( const QString &  extent)
static

Deserialize Extent.

Definition at line 93 of file qgsrasterminmaxorigin.cpp.

◆ extentString()

QString QgsRasterMinMaxOrigin::extentString ( QgsRasterMinMaxOrigin::Extent  extent)
static

Returns a string to serialize Extent.

Definition at line 79 of file qgsrasterminmaxorigin.cpp.

◆ limits()

QgsRasterMinMaxOrigin::Limits QgsRasterMinMaxOrigin::limits ( ) const
inline

Returns the raster limits.

Definition at line 109 of file qgsrasterminmaxorigin.h.

◆ limitsFromString()

QgsRasterMinMaxOrigin::Limits QgsRasterMinMaxOrigin::limitsFromString ( const QString &  limits)
static

Deserialize Limits.

Definition at line 62 of file qgsrasterminmaxorigin.cpp.

◆ limitsString()

QString QgsRasterMinMaxOrigin::limitsString ( Limits  limits)
static

Returns a string to serialize Limits.

Definition at line 46 of file qgsrasterminmaxorigin.cpp.

◆ operator==()

bool QgsRasterMinMaxOrigin::operator== ( const QgsRasterMinMaxOrigin other) const

Equality operator.

Definition at line 36 of file qgsrasterminmaxorigin.cpp.

◆ readXml()

void QgsRasterMinMaxOrigin::readXml ( const QDomElement &  elem)

Deserialize object.

Definition at line 166 of file qgsrasterminmaxorigin.cpp.

◆ setCumulativeCutLower()

void QgsRasterMinMaxOrigin::setCumulativeCutLower ( double  val)
inline

Sets the lower bound of cumulative cut method (between 0 and 1).

Definition at line 138 of file qgsrasterminmaxorigin.h.

◆ setCumulativeCutUpper()

void QgsRasterMinMaxOrigin::setCumulativeCutUpper ( double  val)
inline

Sets the upper bound of cumulative cut method (between 0 and 1).

Definition at line 141 of file qgsrasterminmaxorigin.h.

◆ setExtent()

void QgsRasterMinMaxOrigin::setExtent ( QgsRasterMinMaxOrigin::Extent  extent)
inline

Sets the extent.

Definition at line 132 of file qgsrasterminmaxorigin.h.

◆ setLimits()

void QgsRasterMinMaxOrigin::setLimits ( QgsRasterMinMaxOrigin::Limits  limits)
inline

Sets the limits.

Definition at line 129 of file qgsrasterminmaxorigin.h.

◆ setStatAccuracy()

void QgsRasterMinMaxOrigin::setStatAccuracy ( QgsRasterMinMaxOrigin::StatAccuracy  accuracy)
inline

Sets the statistics accuracy.

Definition at line 135 of file qgsrasterminmaxorigin.h.

◆ setStdDevFactor()

void QgsRasterMinMaxOrigin::setStdDevFactor ( double  val)
inline

Sets the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ].

Definition at line 144 of file qgsrasterminmaxorigin.h.

◆ statAccuracy()

QgsRasterMinMaxOrigin::StatAccuracy QgsRasterMinMaxOrigin::statAccuracy ( ) const
inline

Returns the raster statistic accuracy.

Definition at line 115 of file qgsrasterminmaxorigin.h.

◆ statAccuracyFromString()

QgsRasterMinMaxOrigin::StatAccuracy QgsRasterMinMaxOrigin::statAccuracyFromString ( const QString &  accuracy)
static

Deserialize StatAccuracy.

Definition at line 120 of file qgsrasterminmaxorigin.cpp.

◆ statAccuracyString()

QString QgsRasterMinMaxOrigin::statAccuracyString ( QgsRasterMinMaxOrigin::StatAccuracy  accuracy)
static

Returns a string to serialize StatAccuracy.

Definition at line 113 of file qgsrasterminmaxorigin.cpp.

◆ stdDevFactor()

double QgsRasterMinMaxOrigin::stdDevFactor ( ) const
inline

Returns the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ].

Definition at line 124 of file qgsrasterminmaxorigin.h.

◆ writeXml()

void QgsRasterMinMaxOrigin::writeXml ( QDomDocument &  doc,
QDomElement &  parentElem 
) const

Serialize object.

Definition at line 127 of file qgsrasterminmaxorigin.cpp.

Member Data Documentation

◆ CUMULATIVE_CUT_LOWER

constexpr double QgsRasterMinMaxOrigin::CUMULATIVE_CUT_LOWER = 0.02
staticconstexpr

Default cumulative cut lower limit.

Definition at line 52 of file qgsrasterminmaxorigin.h.

◆ CUMULATIVE_CUT_UPPER

constexpr double QgsRasterMinMaxOrigin::CUMULATIVE_CUT_UPPER = 0.98
staticconstexpr

Default cumulative cut upper limit.

Definition at line 55 of file qgsrasterminmaxorigin.h.

◆ DEFAULT_STDDEV_FACTOR

constexpr double QgsRasterMinMaxOrigin::DEFAULT_STDDEV_FACTOR = 2.0
staticconstexpr

Default standard deviation factor.

Definition at line 58 of file qgsrasterminmaxorigin.h.


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