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

`cat` preserves metadata of first raster

Open tiemvanderdeure opened this issue 3 months ago • 1 comments

A Raster created by concatenating multiple other Rasters keeps the metadata of the first Raster. Is that on purpose?

MWE:

using Rasters, RasterDataSources
months = [4,5,6]
rasters = map(m -> Raster(WorldClim{Climate}, :tavg; month = m, lazy = true), months)
ras = cat(rasters...; dims = Ti(months))
Rasters.metadata(ras) == Rasters.metadata(rasters[1])

Not sure how this should behave, though.

tiemvanderdeure avatar Apr 04 '24 08:04 tiemvanderdeure