Class: QgsRasterBandStats

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

Enums

Stats

alias of RasterBandStatistic

Methods

contains

Compares region, size etc.

Attributes

bandNumber

The gdal band number (starts at 1)

elementCount

The number of not no data cells in the band.

extent

Extent used to calc statistics

height

Number of rows used to calc statistics

maximumValue

The maximum cell value in the raster band.

mean

The mean cell value for the band.

minimumValue

The minimum cell value in the raster band.

range

The range is the distance between min & max.

statsGathered

Collected statistics

stdDev

The standard deviation of the cell values.

sum

The sum of all cells in the band.

sumOfSquares

The sum of the squares.

width

Number of columns used to calc statistics

class qgis.core.QgsRasterBandStats[source]

Bases: object

Stats

alias of RasterBandStatistic

bandNumber: int

The gdal band number (starts at 1)

contains(self, s: QgsRasterBandStats) bool[source]

Compares region, size etc. not collected statistics

Parameters:

s (QgsRasterBandStats)

Return type:

bool

elementCount: int

The number of not no data cells in the band.

extent: QgsRectangle

Extent used to calc statistics

height: int

Number of rows used to calc statistics

maximumValue: float

The maximum cell value in the raster band. NO_DATA values are ignored. This does not use the gdal GetMaximmum function.

mean: float

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

minimumValue: float

The minimum cell value in the raster band. NO_DATA values are ignored. This does not use the gdal GetMinimum function.

range: float

The range is the distance between min & max.

statsGathered: RasterBandStatistics

Collected statistics

stdDev: float

The standard deviation of the cell values.

sum: float

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

sumOfSquares: float

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

width: int

Number of columns used to calc statistics