Open tiemvanderdeure opened 6 months ago
Yes we should try to minimise how much we get Explicit
lookups. But also we should try to convert Explicit
to Regular
before we rasterize as sometimes that will be possible.
Actually rasterizing into Explicit
and Irregular intervals is harder and slow, because e.g. line burning is assuming a straight line accross the grid so it does the angle calculation once.
Maybe in practice most lines only cross one or a few pixels, so it wont make much difference?
I think for normal center
rasterization it wont matter as much, just a level of indirection to check the current position from a vector as we step along the rows. We have very good performance so it might even still be relatively fast.
So:
Explicit
intervals if we dont have toExplicit
to regular in rasterize/mask/zonal etc where this mattersNot entirely sure if this is totally fixed, but the MWE I gave no longer errors
I think getting Regular
instead of Explicit
on load will fix 99% of the problem
Writing a
Raster
to a netcdf and reading it back in again yields aRaster
withExplicit Intervals
, even if the raster originally hadRegular Intervals
.E.g.
This isn't always trivial. For example, rasterizing a polygon to
ras
works, but toras_nc
does not work.