Helper function for specifying the block parameters (nXOff
,
nYOff
, nXsize
, and nYSize
) required by RasterIO
argument in read_stars
Examples
if (FALSE) { # \dontrun{
tif = system.file("tif/L7_ETMs.tif", package = "stars")
r = read_stars(tif, proxy = TRUE)
tiles = st_tile(nrow(r), ncol(r), 256, 256)
for (i in seq_len(nrow(tiles))) {
tile = read_stars(tif, proxy = FALSE, RasterIO = tiles[i, ])
# write tiles to separate files
write_stars(tile, dsn = paste0(i, ".tif"))
}
} # }