Closed chljl closed 3 years ago
count
counts all of the pixels, regardless of their value. If you want to count cells with a value larger than a given value you can use a custom function, like function(value, coverage_fraction) sum(coverage_fraction[value > threshold])
Thanks a lot. That works. The manual says "count- the sum of fractions of raster cells with defined values covered by the polygon“. I thought it means that count can accept user defined values.
Can you give an example of using "count" as the summary operation. I'm not sure what the correct grammar is. exact_extract(rast, poly,'count', const), where const the the cell value I want to count? Also, what if I want to count cells with the value large than a given value?