The input may be an actual raster or a matrix. There is an assumed block size of 256x256, and the scheme will record the number of tiles in each dimension and the amount of "overlapping dangle" when the dimensions of the data don't fit neatly within the tiles.
grout(dimension, extent = NULL, blocksize = NULL, projection = NA_character_)
A "tile scheme" object with information about the tile spacing and extent.
If extent is not provided the default 'xmin=0,xmax=ncol,ymin=0,ymax=nrow' is used.
The tile scheme object has print and plot methods for basic information.
See example in the README with 'wk::rct' to generate plot-able and efficient spatial objects from the scheme.
## one block tile (too big)
grout(c(87, 61), blocksize = c(256L, 256L))
#> tiles: 1, 1 (x * y = 1)
#> block: 256, 256
#> dangle: 169, 195
#> tile resolution: 256, 256
#> tile extent: 0, 256, -195, 61 (xmin,xmax,ymin,ymax)
#> grain: 256, 256 (256 : x, 256 : y)
## more size appropriate
grout(c(87, 61), blocksize = c(8, 8))
#> tiles: 8, 11 (x * y = 88)
#> block: 8, 8
#> dangle: 1, 3
#> tile resolution: 8, 8
#> tile extent: 0, 88, -3, 61 (xmin,xmax,ymin,ymax)
#> grain: 8, 8 (8 : x, 8 : y)
grout(c(10, 20), c(0, 1, 0, 2), blocksize = c(256, 256))
#> tiles: 1, 1 (x * y = 1)
#> block: 256, 256
#> dangle: 246, 236
#> tile resolution: 25.6, 25.6
#> tile extent: 0, 25.6, -23.6, 2 (xmin,xmax,ymin,ymax)
#> grain: 25.6, 25.6 (256 : x, 256 : y)