- Create a Dataset from an array
Re: Create a Dataset from an array
toggle quoted messageShow quoted text
I feel it's too early to make a new function for this. First, I'd like to try to use this to eliminate the copying of data inside InMemoryRaster.
On Thu, Aug 19, 2021 at 3:39 PM <ayr035@...
Thank you for the example code. It seems to work reliably enough for my use case. It was way easier than I imagined it being as I thought it might involve hacking the InMemoryRaster class. Would it be a desirable addition to make it easy for a user to do this in rasterio (at least a helper function generate the MEM string given an array)?
Wrapping the array in a Dataset does not seem to have much of a noticeable performance penalty if any at all. The performance of reading directly from the array (making a copy of any slices) and reading from the Dataset were almost identical.
Join firstname.lastname@example.org to automatically receive all group messages.