[Question] Saving a cropped tile #222
-
I've been thinking, for some use cases, saving the whole extension of the raster is not optimal. How do you manage these cases? I believe that, in this line, only some Line 524 in a8fac5c I think it would be great to allow passing a geometry argument that rakes care of cropping the output and saving only this cropped raster as in: # Define AOI as a shapely polygon, wkt string or other type of geometry
aoi = shapely.Polygon("POLYGON (1 1, 1 0, 0 1, 0 0)
# Pass the area of interest as geometry argument so that it performs the cropping to this aoi before saving the stack
stack = prod.stack([NDVI, MNDWI, GREEN], pixel_size=20, geometry=aoi) I guess loading the product would still need to load the whole product but maybe there's no need to save all of it 😄 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
This should already be supported with the You have a notebook on this topic here 😄 Why |
Beta Was this translation helpful? Give feedback.
This should already be supported with the
window
keyword.You have a notebook on this topic here 😄
Why
window
you may ask? To mimicrasterio
's keyword 😉