QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
raster
qgsrasterminmaxorigin.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsrasterminmaxorigin.h - Origin of min/max values
3
--------------------------------------
4
Date : Dec 2016
5
Copyright : (C) 2016 by Even Rouault
6
email : even.rouault at spatialys.com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSRASTERMINMAXORIGIN_H
19
#define QGSRASTERMINMAXORIGIN_H
20
21
#include "
qgis.h
"
22
#include "qgis_core.h"
23
#include "
qgis_sip.h
"
24
25
#include <QDomDocument>
26
#include <QDomElement>
27
28
class
QgsSettingsEntryDouble
;
29
36
class
CORE_EXPORT
QgsRasterMinMaxOrigin
37
{
38
public
:
40
static
constexpr
double
CUMULATIVE_CUT_LOWER
= 0.02;
41
43
static
constexpr
double
CUMULATIVE_CUT_UPPER
= 0.98;
44
46
static
constexpr
double
DEFAULT_STDDEV_FACTOR
= 2.0;
47
48
QgsRasterMinMaxOrigin
();
49
50
bool
operator==
(
const
QgsRasterMinMaxOrigin
&other )
const
;
51
53
55
Qgis::RasterRangeLimit
limits
()
const
{
return
mLimits; }
56
58
Qgis::RasterRangeExtent
extent
()
const
{
return
mExtent; }
59
61
Qgis::RasterRangeAccuracy
statAccuracy
()
const
{
return
mAccuracy; }
62
64
double
cumulativeCutLower
()
const
{
return
mCumulativeCutLower; }
65
67
double
cumulativeCutUpper
()
const
{
return
mCumulativeCutUpper; }
68
70
double
stdDevFactor
()
const
{
return
mStdDevFactor; }
71
73
75
void
setLimits
(
Qgis::RasterRangeLimit
limits
) { mLimits =
limits
; }
76
78
void
setExtent
(
Qgis::RasterRangeExtent
extent
) { mExtent =
extent
; }
79
81
void
setStatAccuracy
(
Qgis::RasterRangeAccuracy
accuracy ) { mAccuracy = accuracy; }
82
84
void
setCumulativeCutLower
(
double
val ) { mCumulativeCutLower = val; }
85
87
void
setCumulativeCutUpper
(
double
val ) { mCumulativeCutUpper = val; }
88
90
void
setStdDevFactor
(
double
val ) { mStdDevFactor = val; }
91
93
95
void
writeXml( QDomDocument &doc, QDomElement &parentElem )
const
;
96
98
void
readXml(
const
QDomElement &elem );
99
101
103
static
QString limitsString(
Qgis::RasterRangeLimit
limits );
104
106
static
Qgis::RasterRangeLimit
limitsFromString(
const
QString &limits );
107
109
static
QString extentString(
Qgis::RasterRangeExtent
extent );
110
112
static
Qgis::RasterRangeExtent
extentFromString(
const
QString &extent );
113
115
static
QString statAccuracyString(
Qgis::RasterRangeAccuracy
accuracy );
116
118
static
Qgis::RasterRangeAccuracy
statAccuracyFromString(
const
QString &accuracy );
119
120
#ifndef SIP_RUN
121
static
const
QgsSettingsEntryDouble
*
settingsCumulativeCutLower
SIP_SKIP
;
122
123
static
const
QgsSettingsEntryDouble
*
settingsCumulativeCutUpper
SIP_SKIP
;
124
#endif
125
126
private
:
127
Qgis::RasterRangeLimit
mLimits =
Qgis::RasterRangeLimit::NotSet
;
128
Qgis::RasterRangeExtent
mExtent =
Qgis::RasterRangeExtent::WholeRaster
;
129
Qgis::RasterRangeAccuracy
mAccuracy =
Qgis::RasterRangeAccuracy::Estimated
;
130
double
mCumulativeCutLower;
131
double
mCumulativeCutUpper;
132
double
mStdDevFactor;
133
};
134
135
#endif
// QGSRASTERMINMAXORIGIN_H
Qgis::RasterRangeLimit
RasterRangeLimit
Describes the limits used to compute raster ranges (min/max values).
Definition
qgis.h:1714
Qgis::RasterRangeLimit::NotSet
@ NotSet
User defined.
Definition
qgis.h:1715
Qgis::RasterRangeAccuracy
RasterRangeAccuracy
Describes the accuracy used to compute raster ranges (min/max values).
Definition
qgis.h:1745
Qgis::RasterRangeAccuracy::Estimated
@ Estimated
Approximated statistics.
Definition
qgis.h:1747
Qgis::RasterRangeExtent
RasterRangeExtent
Describes the extent used to compute raster ranges (min/max values).
Definition
qgis.h:1730
Qgis::RasterRangeExtent::WholeRaster
@ WholeRaster
Whole raster is used to compute statistics.
Definition
qgis.h:1731
QgsRasterMinMaxOrigin::setLimits
void setLimits(Qgis::RasterRangeLimit limits)
Sets the limits.
Definition
qgsrasterminmaxorigin.h:75
QgsRasterMinMaxOrigin::setExtent
void setExtent(Qgis::RasterRangeExtent extent)
Sets the extent.
Definition
qgsrasterminmaxorigin.h:78
QgsRasterMinMaxOrigin::cumulativeCutLower
double cumulativeCutLower() const
Returns the lower bound of cumulative cut method (between 0 and 1).
Definition
qgsrasterminmaxorigin.h:64
QgsRasterMinMaxOrigin::extent
Qgis::RasterRangeExtent extent() const
Returns the raster extent.
Definition
qgsrasterminmaxorigin.h:58
QgsRasterMinMaxOrigin::CUMULATIVE_CUT_UPPER
static constexpr double CUMULATIVE_CUT_UPPER
Default cumulative cut upper limit.
Definition
qgsrasterminmaxorigin.h:43
QgsRasterMinMaxOrigin::stdDevFactor
double stdDevFactor() const
Returns the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ].
Definition
qgsrasterminmaxorigin.h:70
QgsRasterMinMaxOrigin::DEFAULT_STDDEV_FACTOR
static constexpr double DEFAULT_STDDEV_FACTOR
Default standard deviation factor.
Definition
qgsrasterminmaxorigin.h:46
QgsRasterMinMaxOrigin::setCumulativeCutUpper
void setCumulativeCutUpper(double val)
Sets the upper bound of cumulative cut method (between 0 and 1).
Definition
qgsrasterminmaxorigin.h:87
QgsRasterMinMaxOrigin::setStdDevFactor
void setStdDevFactor(double val)
Sets the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ].
Definition
qgsrasterminmaxorigin.h:90
QgsRasterMinMaxOrigin::settingsCumulativeCutUpper
static const QgsSettingsEntryDouble * settingsCumulativeCutUpper
Definition
qgsrasterminmaxorigin.h:123
QgsRasterMinMaxOrigin::cumulativeCutUpper
double cumulativeCutUpper() const
Returns the upper bound of cumulative cut method (between 0 and 1).
Definition
qgsrasterminmaxorigin.h:67
QgsRasterMinMaxOrigin::setCumulativeCutLower
void setCumulativeCutLower(double val)
Sets the lower bound of cumulative cut method (between 0 and 1).
Definition
qgsrasterminmaxorigin.h:84
QgsRasterMinMaxOrigin::CUMULATIVE_CUT_LOWER
static constexpr double CUMULATIVE_CUT_LOWER
Default cumulative cut lower limit.
Definition
qgsrasterminmaxorigin.h:40
QgsRasterMinMaxOrigin::QgsRasterMinMaxOrigin
QgsRasterMinMaxOrigin()
Definition
qgsrasterminmaxorigin.cpp:51
QgsRasterMinMaxOrigin::statAccuracy
Qgis::RasterRangeAccuracy statAccuracy() const
Returns the raster statistic accuracy.
Definition
qgsrasterminmaxorigin.h:61
QgsRasterMinMaxOrigin::limits
Qgis::RasterRangeLimit limits() const
Returns the raster limits.
Definition
qgsrasterminmaxorigin.h:55
QgsRasterMinMaxOrigin::settingsCumulativeCutLower
static const QgsSettingsEntryDouble * settingsCumulativeCutLower
Definition
qgsrasterminmaxorigin.h:121
QgsRasterMinMaxOrigin::setStatAccuracy
void setStatAccuracy(Qgis::RasterRangeAccuracy accuracy)
Sets the statistics accuracy.
Definition
qgsrasterminmaxorigin.h:81
QgsSettingsEntryDouble
A double settings entry.
Definition
qgssettingsentryimpl.h:557
qgis.h
qgis_sip.h
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:138
operator==
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition
qgsfeatureiterator.h:427
Generated on
for QGIS API Documentation by
1.17.0