You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: python/core/qgsrasterdataprovider.sip
+26-2Lines changed: 26 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -79,8 +79,32 @@ class QgsRasterDataProvider : QgsDataProvider
79
79
80
80
// TODO: Get the file masks supported by this provider, suitable for feeding into the file open dialog box
81
81
82
-
83
-
/**
82
+
// TODO: add other missing bindings (histo, pyramids and others)
83
+
84
+
/** If the provider supports it, return band stats for the
85
+
given band. Default behaviour is to blockwise read the data
86
+
and generate the stats unless the provider overloads this function. */
87
+
//virtual QgsRasterBandStats bandStatistics( int theBandNo );
88
+
89
+
/** \brief Get band statistics.
90
+
* @param theBandNo The band (number).
91
+
* @param theStats Requested statistics
92
+
* @param theExtent Extent used to calc histogram, if empty, whole raster extent is used.
93
+
* @param theSampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample.
94
+
* @return Band statistics.
95
+
*/
96
+
virtual QgsRasterBandStats bandStatistics( int theBandNo,
97
+
int theStats = QgsRasterBandStats::All,
98
+
const QgsRectangle & theExtent = QgsRectangle(),
99
+
int theSampleSize = 0 );
100
+
101
+
/** \brief Returns true if histogram is available (cached, already calculated), the parameters are the same as in histogram() */
102
+
virtual bool hasStatistics( int theBandNo,
103
+
int theStats = QgsRasterBandStats::All,
104
+
const QgsRectangle & theExtent = QgsRectangle(),
105
+
int theSampleSize = 0 );
106
+
107
+
/**
84
108
* Get metadata in a format suitable for feeding directly
85
109
* into a subset of the GUI raster properties "Metadata" tab.
0 commit comments