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 support to specify the bands to calculate statistics on to the python API #156

Open
theroggy opened this issue Sep 19, 2024 · 2 comments
Labels
enhancement New feature or request python

Comments

@theroggy
Copy link
Contributor

Now all bands are calculated, or you need to choose one band when providing a RasterSource.

@dbaston
Copy link
Member

dbaston commented Sep 19, 2024

Something like exact_extract(rast, poly, 'mean', bands=[1,2,3]) ?

It's clear what this would mean if rast is a filename. Less clear what it means if rast is a list of filenames, or a list of RasterSources.

@dbaston dbaston added enhancement New feature or request python labels Sep 19, 2024
@theroggy
Copy link
Contributor Author

theroggy commented Sep 19, 2024

Ideally it would be possible to combine it with multiple images as input... So par example something like this:

rast=[("image1.tif", [1, 2, 3]), ("image2.tif", [4, 5, 6])]

That's also the signature I'm now using for a helper function to calculate zonal statistics in bulk: zonal_stats_bulk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python
Projects
None yet
Development

No branches or pull requests

2 participants