Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rv_array to custom functions #290

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

ericboucher
Copy link
Contributor

This PR is giving access to the rv_array within custom functions to build more advanced stats.


We are using zonal_stats within a project for the United Nations to calculate intersect areas and percentages. Because the nodata filter gets applied to the mask beforehand, we found it difficult to calculate the intersect percentage with custom functions. We resorted to calculating as a combination of metrics, see WFP-VAM/prism-app#893. But it would be great to have access to the rv_array to give users a bit more flexibility to implement more complex statistics.

This is an attempt to do just that :)

PS - super grateful for your project @perrygeo !

@perrygeo
Copy link
Owner

perrygeo commented Oct 5, 2023

@ericboucher good idea, sorry this one slipped through my notifications. This looks solid :shipit:

@perrygeo perrygeo merged commit 5dac003 into perrygeo:master Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants