Skip to content

Way to specify band in python version? #109

Answered by dbaston
tm-jc-nacpil asked this question in Q&A
Discussion options

You must be logged in to vote

You can create a RasterSource and pass that to exact_extract instead of the filename. For example, if you are using rasterio, you could do

from exactextract.raster import RasterioRasterSource
exact_extract(RasterioRasterSource(rast, 2), poly, 'sum')

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tm-jc-nacpil
Comment options

Answer selected by tm-jc-nacpil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants