Closed tiemvanderdeure closed 4 months ago
Maybe we are not dropping the band dimension properly, that should happen in warp
but maybe isn't?
Usually we check if there was a band in the original raster and dropdims(rast, Band())
if not.
No the problem was setting the dims to dims(to)
without checking if there were other dims than just X/Y
Finally got tests to pass!
This PR ensures that the
x
andto
have the same dimensions after resampling, if onlyto
is provided.Using size rather than resolution as a fallback means floating point error does not affect the outcome.
If only
to
is provided, the dimensions of the resampled raster will be set exactly match the dimensions ofto
.