QGIS API Documentation
2.2.0-Valmiera
|
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. | |
double | maximumValue |
The maximum cell value in the raster band. | |
double | minimumValue |
The minimum cell value in the raster band. | |
double | mean |
The mean cell value for the band. | |
double | range |
The range is the distance between min & max. | |
double | stdDev |
The standard deviation of the cell values. | |
int | statsGathered |
Collected statistics. | |
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. | |
int | height |
Number of rows used to calc statistics. | |
QgsRectangle | extent |
Extent used to calc statistics. |
The RasterBandStats struct is a container for statistics about a single raster band.
Definition at line 33 of file qgsrasterbandstats.h.
Definition at line 36 of file qgsrasterbandstats.h.
|
inline |
Definition at line 49 of file qgsrasterbandstats.h.
References MathUtils::max(), and MathUtils::min().
|
inline |
Compares region, size etc. not collected statistics
Definition at line 65 of file qgsrasterbandstats.h.
References bandNumber, extent, height, statsGathered, and width.
Referenced by QgsRasterInterface::bandStatistics(), and QgsRasterInterface::hasStatistics().
int QgsRasterBandStats::bandNumber |
The gdal band number (starts at 1)
Definition at line 75 of file qgsrasterbandstats.h.
Referenced by contains(), and QgsRasterInterface::initStatistics().
qgssize QgsRasterBandStats::elementCount |
The number of not no data cells in the band.
Definition at line 79 of file qgsrasterbandstats.h.
Referenced by QgsRasterInterface::bandStatistics(), and QgsRasterLayer::metadata().
QgsRectangle QgsRasterBandStats::extent |
Extent used to calc statistics.
Definition at line 114 of file qgsrasterbandstats.h.
Referenced by QgsRasterInterface::bandStatistics(), contains(), and QgsRasterInterface::initStatistics().
int QgsRasterBandStats::height |
Number of rows used to calc statistics.
Definition at line 111 of file qgsrasterbandstats.h.
Referenced by QgsRasterInterface::bandStatistics(), contains(), and QgsRasterInterface::initStatistics().
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 83 of file qgsrasterbandstats.h.
Referenced by QgsRasterInterface::bandStatistics(), QgsProjectFileTransform::convertRasterProperties(), QgsRasterInterface::initHistogram(), QgsRasterLayer::metadata(), QgsRasterRendererRegistry::minMaxValuesForBand(), QgsRasterMinMaxWidget::on_mLoadPushButton_clicked(), QgsRasterChecker::runTest(), QgsRasterLayer::setContrastEnhancement(), and QgsRasterFileWriter::writeDataRaster().
double QgsRasterBandStats::mean |
The mean cell value for the band.
NO_DATA values are excluded.
Definition at line 90 of file qgsrasterbandstats.h.
Referenced by QgsRasterInterface::bandStatistics(), QgsRasterLayer::metadata(), QgsRasterRendererRegistry::minMaxValuesForBand(), QgsRasterMinMaxWidget::on_mLoadPushButton_clicked(), QgsRasterChecker::runTest(), and QgsRasterLayer::setContrastEnhancement().
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 87 of file qgsrasterbandstats.h.
Referenced by QgsRasterInterface::bandStatistics(), QgsProjectFileTransform::convertRasterProperties(), QgsRasterInterface::initHistogram(), QgsRasterLayer::metadata(), QgsRasterRendererRegistry::minMaxValuesForBand(), QgsRasterMinMaxWidget::on_mLoadPushButton_clicked(), QgsRasterChecker::runTest(), QgsRasterLayer::setContrastEnhancement(), and QgsRasterFileWriter::writeDataRaster().
double QgsRasterBandStats::range |
The range is the distance between min & max.
Definition at line 93 of file qgsrasterbandstats.h.
Referenced by QgsRasterInterface::bandStatistics(), and QgsRasterLayer::metadata().
int QgsRasterBandStats::statsGathered |
Collected statistics.
Definition at line 99 of file qgsrasterbandstats.h.
Referenced by QgsRasterInterface::bandStatistics(), contains(), and QgsRasterInterface::initStatistics().
double QgsRasterBandStats::stdDev |
The standard deviation of the cell values.
Definition at line 96 of file qgsrasterbandstats.h.
Referenced by QgsRasterInterface::bandStatistics(), QgsRasterLayer::metadata(), QgsRasterRendererRegistry::minMaxValuesForBand(), QgsRasterMinMaxWidget::on_mLoadPushButton_clicked(), QgsRasterChecker::runTest(), and QgsRasterLayer::setContrastEnhancement().
double QgsRasterBandStats::sum |
The sum of all cells in the band.
NO_DATA values are excluded.
Definition at line 102 of file qgsrasterbandstats.h.
Referenced by QgsRasterInterface::bandStatistics(), and QgsRasterLayer::metadata().
double QgsRasterBandStats::sumOfSquares |
The sum of the squares.
Used to calculate standard deviation.
Definition at line 105 of file qgsrasterbandstats.h.
Referenced by QgsRasterInterface::bandStatistics(), and QgsRasterLayer::metadata().
int QgsRasterBandStats::width |
Number of columns used to calc statistics.
Definition at line 108 of file qgsrasterbandstats.h.
Referenced by QgsRasterInterface::bandStatistics(), contains(), and QgsRasterInterface::initStatistics().