library(sp)
demo(meuse, echo=FALSE)
rast <- terra::rast(meuse.grid[, "dist"])
# tiling dem in tiles 250x250 with 25 cells overlap
tiles = tiling(rast,
tilesize=20,
overlapping=5,
aspoints=TRUE)
# number of tiles
length(tiles)
# \donttest{
plot(rast)
plot(tiles[[1]] , pch='-' ,col ='green', add=TRUE)
plot(tiles[[2]], pch='.', add=TRUE)
# }
str(tiles[[1]])
Run the code above in your browser using DataLab