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 percent_valid_points statistic to the get_stats() method in the Raster class #679

Open
vschaffn opened this issue Jan 24, 2025 · 0 comments · May be fixed by GlacioHack/geoutils#644
Open

Comments

@vschaffn
Copy link
Contributor

vschaffn commented Jan 24, 2025

Context

Currently, the get_stats() method in the Raster class provides a set of statistics about the raster, such as minimum, maximum, mean, etc. However, there is no statistic that calculates the percentage of valid (non-NaN) points in the raster.
This feature would be particularly useful when working with DEMs.

Steps to implement

  • Modify the get_stats() method to calculate the percentage of valid (non-NaN) points.
  • Add this value to the dictionary returned by get_stats() under the key Valid points.

Note

This implementation will be carried out in geoutils.

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 a pull request may close this issue.

1 participant