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)
# plot(rast)
# plot(tiles[[1]] , pch='-' ,col ='green', add=T)
# plot(tiles[[2]], pch='.', add=T)
str(tiles[[1]])
Run the code above in your browser using DataLab