QGIS API Documentation
4.3.0-Master (a080b0d5f12)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
raster
qgsrasterbandstats.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsrasterbandstats.h - description
3
-------------------
4
begin : Fri Jun 28 2002
5
copyright : (C) 2005 by T.Sutton
6
email : tim@linfiniti.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 QGSRASTERBANDSTATS
19
#define QGSRASTERBANDSTATS
20
21
#include <limits>
22
23
#include "
qgis.h
"
24
#include "qgis_core.h"
25
#include "
qgis_sip.h
"
26
#include "
qgsrectangle.h
"
27
28
#include <QString>
29
#include <QVector>
30
36
class
CORE_EXPORT
QgsRasterBandStats
37
{
38
public
:
39
QgsRasterBandStats
() =
default
;
40
42
bool
contains
(
const
QgsRasterBandStats
&s )
const
43
{
44
return
( s.
bandNumber
==
bandNumber
&& s.
extent
==
extent
&& s.
width
==
width
&& s.
height
==
height
&& s.
statsGathered
== (
statsGathered
& s.
statsGathered
) );
45
}
46
48
int
bandNumber
= 1;
49
50
// TODO: check if no data are excluded in stats calculation
51
53
qgssize
elementCount
= 0;
54
59
double
maximumValue
= -std::numeric_limits<double>::max();
60
65
double
minimumValue
= std::numeric_limits<double>::max();
66
68
double
mean
= 0;
69
71
double
range
= 0;
72
74
double
stdDev
= 0;
75
77
Qgis::RasterBandStatistics
statsGathered
;
78
80
double
sum
= 0;
81
83
double
sumOfSquares
= 0;
84
86
int
width
= 0;
87
89
int
height
= 0;
90
92
QgsRectangle
extent
;
93
};
94
95
#endif
Qgis::RasterBandStatistics
QFlags< RasterBandStatistic > RasterBandStatistics
Statistics to be calculated for raster bands.
Definition
qgis.h:6791
QgsRasterBandStats::elementCount
qgssize elementCount
The number of not no data cells in the band.
Definition
qgsrasterbandstats.h:53
QgsRasterBandStats::bandNumber
int bandNumber
The gdal band number (starts at 1).
Definition
qgsrasterbandstats.h:48
QgsRasterBandStats::sumOfSquares
double sumOfSquares
The sum of the squares. Used to calculate standard deviation.
Definition
qgsrasterbandstats.h:83
QgsRasterBandStats::height
int height
Number of rows used to calc statistics.
Definition
qgsrasterbandstats.h:89
QgsRasterBandStats::mean
double mean
The mean cell value for the band. NO_DATA values are excluded.
Definition
qgsrasterbandstats.h:68
QgsRasterBandStats::QgsRasterBandStats
QgsRasterBandStats()=default
QgsRasterBandStats::extent
QgsRectangle extent
Extent used to calc statistics.
Definition
qgsrasterbandstats.h:92
QgsRasterBandStats::stdDev
double stdDev
The standard deviation of the cell values.
Definition
qgsrasterbandstats.h:74
QgsRasterBandStats::minimumValue
double minimumValue
The minimum cell value in the raster band.
Definition
qgsrasterbandstats.h:65
QgsRasterBandStats::width
int width
Number of columns used to calc statistics.
Definition
qgsrasterbandstats.h:86
QgsRasterBandStats::sum
double sum
The sum of all cells in the band. NO_DATA values are excluded.
Definition
qgsrasterbandstats.h:80
QgsRasterBandStats::statsGathered
Qgis::RasterBandStatistics statsGathered
Collected statistics.
Definition
qgsrasterbandstats.h:77
QgsRasterBandStats::maximumValue
double maximumValue
The maximum cell value in the raster band.
Definition
qgsrasterbandstats.h:59
QgsRasterBandStats::range
double range
The range is the distance between min & max.
Definition
qgsrasterbandstats.h:71
QgsRasterBandStats::contains
bool contains(const QgsRasterBandStats &s) const
Compares region, size etc. not collected statistics.
Definition
qgsrasterbandstats.h:42
QgsRectangle
A rectangle specified with double values.
Definition
qgsrectangle.h:47
qgis.h
qgssize
unsigned long long qgssize
Qgssize is used instead of size_t, because size_t is stdlib type, unknown by SIP, and it would be har...
Definition
qgis.h:8400
qgis_sip.h
qgsrectangle.h
Generated on
for QGIS API Documentation by
1.17.0