rafaqz / Rasters.jl

Raster manipulation for the Julia language
MIT License
197 stars 34 forks source link

Feature request: more geometry options for `zonal` #677

Open danscr opened 4 weeks ago

danscr commented 4 weeks ago

Currently, geometry in zonal considers cells where center, the whole or part of the cell are contained within another geometry. For polygon data, it would be quite useful to calculate the fraction of overlap between cell and polygon to compute statistics.

rafaqz commented 4 weeks ago

You could do this manually in a loop over each polygon using coverage.

But yes it would be nice to automate that process. We can just call coverage instead of boolmask internally and multiple by coverage rather than masking.

Maybe with a separate coverage=true keyword? To show that it's quite different to choosing a boundary?