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 value counts under polygons in zonal statistics #271

Conversation

phargogh
Copy link
Member

This PR adds pixel counts under each polygon and warns the user if pixel counts have been requested on a floating-point raster.

Fixes #270

@phargogh phargogh self-assigned this Aug 10, 2022
@phargogh phargogh requested a review from emlys August 11, 2022 18:55
@phargogh phargogh marked this pull request as ready for review August 11, 2022 18:55
@phargogh
Copy link
Member Author

@emlys this should be ready to review now!

src/pygeoprocessing/geoprocessing.py Outdated Show resolved Hide resolved
src/pygeoprocessing/geoprocessing.py Outdated Show resolved Hide resolved
src/pygeoprocessing/geoprocessing.py Show resolved Hide resolved
src/pygeoprocessing/geoprocessing.py Show resolved Hide resolved
I'm trying to clarify the intent of the function and the created dict
... "sample" isn't a good descriptor for what's going on here.

RE:natcap#270
@phargogh phargogh requested a review from emlys September 16, 2022 23:05
Copy link
Member

@emlys emlys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @phargogh!

@emlys emlys merged commit ff5eb8e into natcap:main Sep 28, 2022
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.

Proposal: optionally return unique pixel counts under each polygon
2 participants