Open mdsumner opened 2 years ago
then probably, need to convert these to R-order in big chunks and read big swathes of raster - with masks for the different kernels, and a group by to do the calcs
see here, it's actually pretty simple because we only have a matrix for the kernel to apply to - read a chunk that aligns to the kernel size, and zap out the dangle on the left and top by index out of bounds, you don't care what the extent is just use local cell logic as the data is a flat vector, we expand out by kernel group ID
https://github.com/hypertidy/vaster/blob/10ef32a3ff98ec3c27073c933e9603b8eeebfcec/R/kernel.R
for focal, we need something like
which, is called for each 1:prod(dimension) to provide
offset
anddimension
for a given cell (size = 1 is 3x3)the output is the input to
vapour_read_raster(window = )
- 0-based index