mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
- update methods of existing classes - add comment to methods missing in the sip bindings - split up collective sip files into single files and use same directory structure in python/ as in src/ - add a lot of missing classes (some might not make sense because of missing python methods in those classes) - remove some non-existing methods from the header files - add scripts/sipdiff - replace some usages of std::vector and std::set with QVector/QSet
79 lines
2.0 KiB
Plaintext
79 lines
2.0 KiB
Plaintext
|
|
/** \brief The RasterBandStats struct is a container for statistics about a single
|
|
* raster band.
|
|
*/
|
|
class QgsRasterBandStats
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgsrasterbandstats.h>
|
|
%End
|
|
|
|
public:
|
|
enum Stats
|
|
{
|
|
None = 0,
|
|
Min = 1,
|
|
Max = 2,
|
|
Range = 4,
|
|
Sum = 8,
|
|
Mean = 16,
|
|
StdDev = 32,
|
|
SumOfSquares = 64,
|
|
All = 127
|
|
};
|
|
|
|
QgsRasterBandStats();
|
|
|
|
/*! Compares region, size etc. not collected statistics */
|
|
bool contains( const QgsRasterBandStats &s ) const;
|
|
|
|
/** \brief The name of the band that these stats belong to. */
|
|
QString bandName;
|
|
|
|
/** \brief The gdal band number (starts at 1)*/
|
|
int bandNumber;
|
|
|
|
/** Color table */
|
|
// QList<QgsColorRampShader::ColorRampItem> colorTable;
|
|
|
|
/** \brief The number of cells in the band. Equivalent to height x width.
|
|
* TODO: check if NO_DATA are excluded!*/
|
|
int elementCount;
|
|
|
|
/** \brief The maximum cell value in the raster band. NO_DATA values
|
|
* are ignored. This does not use the gdal GetMaximmum function. */
|
|
double maximumValue;
|
|
|
|
/** \brief The minimum cell value in the raster band. NO_DATA values
|
|
* are ignored. This does not use the gdal GetMinimum function. */
|
|
double minimumValue;
|
|
|
|
/** \brief The mean cell value for the band. NO_DATA values are excluded. */
|
|
double mean;
|
|
|
|
/** \brief The range is the distance between min & max. */
|
|
double range;
|
|
|
|
/** \brief The standard deviation of the cell values. */
|
|
double stdDev;
|
|
|
|
/** \brief Collected statistics */
|
|
int statsGathered;
|
|
|
|
/** \brief The sum of all cells in the band. NO_DATA values are excluded. */
|
|
double sum;
|
|
|
|
/** \brief The sum of the squares. Used to calculate standard deviation. */
|
|
double sumOfSquares;
|
|
|
|
/** \brief Number of columns used to calc statistics */
|
|
int width;
|
|
|
|
/** \brief Number of rows used to calc statistics */
|
|
int height;
|
|
|
|
/** \brief Extent used to calc statistics */
|
|
QgsRectangle extent;
|
|
};
|
|
|