Skip to content

Commit

Permalink
DOC: Add some examples to the operations page (#153)
Browse files Browse the repository at this point in the history
DOC: Add some examples to the operations page
  • Loading branch information
theroggy authored Sep 6, 2024
1 parent 3149ffd commit 492448c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions python/doc/operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,19 @@ The behavior of these statistics may be modified by the following arguments:
* ``default_value`` - specifies a value to be used for NODATA pixels instead of ignoring them
* ``default_weight`` - specifies a weighing value to be used for NODATA pixels instead of ignoring them
* ``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.

Examples
--------

* ``quantile(q=0.33)``: the 33% quantile of the pixels that intersect the polygon,
weighted by the coverage fraction of each pixel.
* ``count(default_value=0)``: the sum of all pixel coverage fractions, including
NODATA pixels, as they will be treated as having value 0 instead of being ignored.
* ``mean(min_coverage_frac=0.5)``: the mean value of pixels having 50% or
more of their area covered by the polygon. Pixel values will be weighted by the
coverage fraction.
* ``mean(min_coverage_frac=0.5,coverage_weight=none)``: the mean value of pixels
having 50% or more of their area covered by the polygon. Pixel values will be
weighted equally (all included pixels treated as having 100% coverage).
* ``mean(coverage_weight=none)``: the mean value of pixels that intersect the polygon.
All pixels with any coverage will be counted as having 100% coverage.

0 comments on commit 492448c

Please sign in to comment.