Skip to content

Commit 492448c

Browse files
authored
DOC: Add some examples to the operations page (#153)
DOC: Add some examples to the operations page
1 parent 3149ffd commit 492448c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

python/doc/operations.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,19 @@ The behavior of these statistics may be modified by the following arguments:
213213
* ``default_value`` - specifies a value to be used for NODATA pixels instead of ignoring them
214214
* ``default_weight`` - specifies a weighing value to be used for NODATA pixels instead of ignoring them
215215
* ``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

Comments
 (0)