SimpleSDMLayers.jl
SimpleSDMLayers.jl copied to clipboard
✅ resizing one layer to the size of another, and ambiguity in `rescale` function meaning
Description of the to-do item
As far as I can tell, there is not a function to take a raster and change its resolution to match the dimensions of a target raster. Doing this would be straightforward by iterating over the longitudes(a)
, latitudes(a)
in the smaller raster and then access the values of the other raster at that coord, and have the getindex(b::SimpleSDMLayer, lat, long)
handle that conversion.
When trying to do this I found rescale(layer1::T, layer2::T) where {T <: SimpleSDMLayer}
,which scales the values of a given raster to match a target, but not dimensions. To avoid this semantic ambiguity, perhaps the method rescale
could rescale both values and dimensions by default with kw arguments to turn either off