QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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) More...
 
qgssize elementCount
 The number of not no data cells in the band. More...
 
double maximumValue
 The maximum cell value in the raster band. More...
 
double minimumValue
 The minimum cell value in the raster band. More...
 
double mean
 The mean cell value for the band. More...
 
double range
 The range is the distance between min & max. More...
 
double stdDev
 The standard deviation of the cell values. More...
 
int statsGathered
 Collected statistics. More...
 
double sum
 The sum of all cells in the band. More...
 
double sumOfSquares
 The sum of the squares. More...
 
int width
 Number of columns used to calc statistics. More...
 
int height
 Number of rows used to calc statistics. More...
 
QgsRectangle extent
 Extent used to calc statistics. More...
 

Detailed Description

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

Constructor & Destructor Documentation

QgsRasterBandStats::QgsRasterBandStats ( )
inline

Member Function Documentation

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

Compares region, size etc. not collected statistics

Member Data Documentation

int QgsRasterBandStats::bandNumber

The gdal band number (starts at 1)

qgssize QgsRasterBandStats::elementCount

The number of not no data cells in the band.

QgsRectangle QgsRasterBandStats::extent

Extent used to calc statistics.

int QgsRasterBandStats::height

Number of rows used to calc statistics.

double QgsRasterBandStats::maximumValue

The maximum cell value in the raster band.

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

double QgsRasterBandStats::mean

The mean cell value for the band.

NO_DATA values are excluded.

double QgsRasterBandStats::minimumValue

The minimum cell value in the raster band.

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

double QgsRasterBandStats::range

The range is the distance between min & max.

int QgsRasterBandStats::statsGathered

Collected statistics.

double QgsRasterBandStats::stdDev

The standard deviation of the cell values.

double QgsRasterBandStats::sum

The sum of all cells in the band.

NO_DATA values are excluded.

double QgsRasterBandStats::sumOfSquares

The sum of the squares.

Used to calculate standard deviation.

int QgsRasterBandStats::width

Number of columns used to calc statistics.


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