QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | List of all members
QgsRasterBandStats Class Reference

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

#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

Public Attributes

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

Detailed Description

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

Definition at line 33 of file qgsrasterbandstats.h.

Member Enumeration Documentation

Enumerator:
None 
Min 
Max 
Range 
Sum 
Mean 
StdDev 
SumOfSquares 
All 

Definition at line 36 of file qgsrasterbandstats.h.

Constructor & Destructor Documentation

QgsRasterBandStats::QgsRasterBandStats ( )
inline

Definition at line 49 of file qgsrasterbandstats.h.

Member Function Documentation

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

Compares region, size etc. not collected statistics

Definition at line 66 of file qgsrasterbandstats.h.

Member Data Documentation

int QgsRasterBandStats::bandNumber

The gdal band number (starts at 1)

Definition at line 76 of file qgsrasterbandstats.h.

qgssize QgsRasterBandStats::elementCount

The number of not no data cells in the band.

Definition at line 80 of file qgsrasterbandstats.h.

QgsRectangle QgsRasterBandStats::extent

Extent used to calc statistics.

Definition at line 115 of file qgsrasterbandstats.h.

int QgsRasterBandStats::height

Number of rows used to calc statistics.

Definition at line 112 of file qgsrasterbandstats.h.

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 84 of file qgsrasterbandstats.h.

double QgsRasterBandStats::mean

The mean cell value for the band.

NO_DATA values are excluded.

Definition at line 91 of file qgsrasterbandstats.h.

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 88 of file qgsrasterbandstats.h.

double QgsRasterBandStats::range

The range is the distance between min & max.

Definition at line 94 of file qgsrasterbandstats.h.

int QgsRasterBandStats::statsGathered

Collected statistics.

Definition at line 100 of file qgsrasterbandstats.h.

double QgsRasterBandStats::stdDev

The standard deviation of the cell values.

Definition at line 97 of file qgsrasterbandstats.h.

double QgsRasterBandStats::sum

The sum of all cells in the band.

NO_DATA values are excluded.

Definition at line 103 of file qgsrasterbandstats.h.

double QgsRasterBandStats::sumOfSquares

The sum of the squares.

Used to calculate standard deviation.

Definition at line 106 of file qgsrasterbandstats.h.

int QgsRasterBandStats::width

Number of columns used to calc statistics.

Definition at line 109 of file qgsrasterbandstats.h.


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