cov_tile | R Documentation |
Uses SpaDES.tools::splitRaster
to generate tiles of a given set of rasters using parallel processing.
cov_tile(rList, output = "./tiles/", pxCount = 1000, index = TRUE)
rList |
a vector of files to process (e.g. |
output |
character, destination of output tiles. Note that a subdirectory for each raster given will be created within this folder. |
pxCount |
the maximum number of pixels in the x and y direction. |
index |
When |
r <- raster::raster(ncol=100, nrow=100) ## empty raster r <- raster::setValues(r, rnorm(raster::ncell(r), 1)) ## dir.create("e:/cv_tile") raster::writeRaster(r, "e:/cv_tile/r.tif") rasterList <- list.files("e:/cv_tile", full.names = TRUE) ## make sure this is the rasters only! cv_tile(rList = rasterList, output = "e:/cv_tile", pxCount = 50, index = TRUE) #> [1] "Tiling: r.tif ... 1 of 1" #> [1] "Generating Tile index: e:/cv_tile/r_tiles/tileindex.gpkg" list.files("e:/cv_tile", recursive = TRUE, full.names = TRUE) #> [1] "e:/cv_tile/r.tif" #> [2] "e:/cv_tile/r_tiles/r_tile1.grd" #>[10] "e:/cv_tile/r_tiles/tileindex.gpkg"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.