rafaqz / DimensionalData.jl

Named dimensions and indexing for julia arrays and other data
https://rafaqz.github.io/DimensionalData.jl/stable/
MIT License
273 stars 38 forks source link

Displaying a RasterStack with a long, merged dimension takes a while #812

Open asinghvi17 opened 20 hours ago

asinghvi17 commented 20 hours ago
using Rasters

r1 = Raster(rand(X(1:1000), Y(1:1000)))
r2 = Raster(rand(dims(r1)...))

rs = RasterStack(r1, r2)

bool_cond_raster = r1 .> 0.5
mask_inds = Rasters.DD.DimIndices(bool_cond_raster)[bool_cond_raster]
rs[mask_inds]

https://github.com/user-attachments/assets/04bb969c-39cd-4732-bbae-6c475c7e5db9

asinghvi17 commented 20 hours ago

Maybe this is better raised in DimensionalData.jl?

rafaqz commented 19 hours ago

I'll transfer it over

rafaqz commented 4 hours ago

Had to fix your MWE, but yes something is really wrong with show here