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

#include <qgsrasterbandstats.h>

Public Types

enum  Stats {
  None = 0, Min = 1, Max = 1 << 1, Range = 1 << 2,
  Sum = 1 << 3, Mean = 1 << 4, StdDev = 1 << 5, SumOfSquares = 1 << 6,
  All = Min | Max | Range | Sum | Mean | StdDev | SumOfSquares
}
 

Public Member Functions

 QgsRasterBandStats ()
 
bool contains (const QgsRasterBandStats &s) const
 Compares region, size etc. not collected statistics. More...
 

Public Attributes

int bandNumber
 The gdal band number (starts at 1) More...
 
qgssize elementCount
 The number of not no data cells in the band. More...
 
QgsRectangle extent
 Extent used to calc statistics. More...
 
int height
 Number of rows used to calc statistics. More...
 
double maximumValue
 The maximum cell value in the raster band. More...
 
double mean
 The mean cell value for the band. NO_DATA values are excluded. More...
 
double minimumValue
 The minimum cell value in the raster band. More...
 
double range
 The range is the distance between min & max. More...
 
int statsGathered
 Collected statistics. More...
 
double stdDev
 The standard deviation of the cell values. More...
 
double sum
 The sum of all cells in the band. NO_DATA values are excluded. More...
 
double sumOfSquares
 The sum of the squares. Used to calculate standard deviation. More...
 
int width
 Number of columns used to calc statistics. More...
 

Detailed Description

The RasterBandStats struct is a container for statistics about a single raster band.

Definition at line 34 of file qgsrasterbandstats.h.

Member Enumeration Documentation

◆ Stats

Enumerator
None 
Min 
Max 
Range 
Sum 
Mean 
StdDev 
SumOfSquares 
All 

Definition at line 50 of file qgsrasterbandstats.h.

Constructor & Destructor Documentation

◆ QgsRasterBandStats()

QgsRasterBandStats::QgsRasterBandStats ( )
inline

Definition at line 63 of file qgsrasterbandstats.h.

Member Function Documentation

◆ contains()

bool QgsRasterBandStats::contains ( const QgsRasterBandStats s) const
inline

Compares region, size etc. not collected statistics.

Definition at line 80 of file qgsrasterbandstats.h.

Member Data Documentation

◆ bandNumber

int QgsRasterBandStats::bandNumber

The gdal band number (starts at 1)

Definition at line 90 of file qgsrasterbandstats.h.

◆ elementCount

qgssize QgsRasterBandStats::elementCount

The number of not no data cells in the band.

Definition at line 94 of file qgsrasterbandstats.h.

◆ extent

QgsRectangle QgsRasterBandStats::extent

Extent used to calc statistics.

Definition at line 131 of file qgsrasterbandstats.h.

◆ height

int QgsRasterBandStats::height

Number of rows used to calc statistics.

Definition at line 128 of file qgsrasterbandstats.h.

◆ maximumValue

double QgsRasterBandStats::maximumValue

The maximum cell value in the raster band.

NO_DATA values are ignored. This does not use the gdal GetMaximmum function.

Definition at line 99 of file qgsrasterbandstats.h.

◆ mean

double QgsRasterBandStats::mean

The mean cell value for the band. NO_DATA values are excluded.

Definition at line 107 of file qgsrasterbandstats.h.

◆ minimumValue

double QgsRasterBandStats::minimumValue

The minimum cell value in the raster band.

NO_DATA values are ignored. This does not use the gdal GetMinimum function.

Definition at line 104 of file qgsrasterbandstats.h.

◆ range

double QgsRasterBandStats::range

The range is the distance between min & max.

Definition at line 110 of file qgsrasterbandstats.h.

◆ statsGathered

int QgsRasterBandStats::statsGathered

Collected statistics.

Definition at line 116 of file qgsrasterbandstats.h.

◆ stdDev

double QgsRasterBandStats::stdDev

The standard deviation of the cell values.

Definition at line 113 of file qgsrasterbandstats.h.

◆ sum

double QgsRasterBandStats::sum

The sum of all cells in the band. NO_DATA values are excluded.

Definition at line 119 of file qgsrasterbandstats.h.

◆ sumOfSquares

double QgsRasterBandStats::sumOfSquares

The sum of the squares. Used to calculate standard deviation.

Definition at line 122 of file qgsrasterbandstats.h.

◆ width

int QgsRasterBandStats::width

Number of columns used to calc statistics.

Definition at line 125 of file qgsrasterbandstats.h.


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