Rasters.jl
Rasters.jl copied to clipboard
rasterize into a too large array should error instead of killing VS Code
When I am stupid enough to rasterize into a 50000 x 50000 array I would have hoped, that this would error immediately instead of killing my julia session while trying to allocate this much memory.
I know that I can specify a filename and then this should just work, but this still seems like a footgun.
Maybe we can get the size of the available RAM and then throw an error if the result would be larger.
Yeah, there is a function to check this we just need to call it in the right place.
(And one day this should just work on a DiskArray... we already have the code because coverage is chunked rasterize as if each pixel is a chunk)