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/doc/operations.rst
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -213,3 +213,19 @@ The behavior of these statistics may be modified by the following arguments:
213
213
* ``default_value`` - specifies a value to be used for NODATA pixels instead of ignoring them
214
214
* ``default_weight`` - specifies a weighing value to be used for NODATA pixels instead of ignoring them
215
215
* ``min_coverage_frac`` - specifies the minimum fraction of the pixel (0 to 1) that must be covered in order for a pixel to be considered in calculations. Defaults to 0.
216
+
217
+
Examples
218
+
--------
219
+
220
+
* ``quantile(q=0.33)``: the 33% quantile of the pixels that intersect the polygon,
221
+
weighted by the coverage fraction of each pixel.
222
+
* ``count(default_value=0)``: the sum of all pixel coverage fractions, including
223
+
NODATA pixels, as they will be treated as having value 0 instead of being ignored.
224
+
* ``mean(min_coverage_frac=0.5)``: the mean value of pixels having 50% or
225
+
more of their area covered by the polygon. Pixel values will be weighted by the
226
+
coverage fraction.
227
+
* ``mean(min_coverage_frac=0.5,coverage_weight=none)``: the mean value of pixels
228
+
having 50% or more of their area covered by the polygon. Pixel values will be
229
+
weighted equally (all included pixels treated as having 100% coverage).
230
+
* ``mean(coverage_weight=none)``: the mean value of pixels that intersect the polygon.
231
+
All pixels with any coverage will be counted as having 100% coverage.
0 commit comments