Is it possible to create a rasterio object without exporting a file?

Leah Wasser

Hi All,
I am running into a consistent workflow issue. i'd like to crop a numpy array. I have metadata dict and a numpy array but then want to crop it. is there a way to crop a numpy array to a new extent (using rio.mask()) using just the meta file rather than needing to export the array and reimport it to instantiate a rasterio object and create a new numpy array and associated meta?

Perhaps i'm missing something very basic!!
thank you

Join to automatically receive all group messages.