Rasters.jl icon indicating copy to clipboard operation
Rasters.jl copied to clipboard

rasterize into a too large array should error instead of killing VS Code

Open felixcremer opened this issue 4 weeks ago • 1 comments

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.

felixcremer avatar Nov 14 '25 09:11 felixcremer

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)

rafaqz avatar Nov 15 '25 00:11 rafaqz