Closed tiemvanderdeure closed 3 months ago
I suspect the difference is because the Raster constructor calls Dimensions.format on the input in line 262 of array.jl
A = Raster(A, Dimensions.format(dims, A), refdims, name, metadata, missingval)
Yeah thats a weird error, maybe some assumptions being broken because X(1.0:1:2.0)
doesn't hold a Lookup
from lack of format
as @felixcremer mentions
Turns out it works fine if we fix the keyword oops no it doesn't
We need to call format
on it so it has an Extent
- a range on its own has no extent because we don't know if its points or intervals or categories or whatever.
Ok and format
compiles away if its already a Lookup
so I'll just add that in.
Crop is (too?) picky about what dimensions it will crop to.
MWE:
Here the latter
crop
errors, but the former works, which is kind of weird. It seems to be due to this:But I don't really know why one is a sampled and the other is not?
The error message also isn't particularly helpful: