View source: R/AgroSoil_generic_functions.R
tiles_DEM4Deriv | R Documentation |
It is importance to split up a large raster dataset into chunks of smaller spatial tiles so as to speed data processing and optimize the use of computer resources. Hence, this function
tiles_DEM4Deriv(i, tile.tbl, in.covs, out.path)
i |
Vector of spatial tile IDs |
tile.tbl |
Output of "getSpatialTiles" function from GSIFR package. |
in.covs |
List of DEM(s) to split into smaller spatial tiles |
out.path |
Path to folder containing tile directories |
First, a chunk of the original DEM file saved as a .rds file on disk. Second, a .sdat file on disk for later use with SAGA-GIS
library(GSIF) library(rgdal) i <- as.numeric(20) DEM_ObjInfo <- GDALinfo("filename of DEM/Raster file") tile.tbl <- getSpatialTiles(DEM_ObjInfo, block.x=2000, return.SpatialPolygons=FALSE, overlap.percent=10) tile.tbl$ID = as.character(1:nrow(tile.tbl)) in.covs <- "filename of DEM/Raster file" out.path <- path to folder containing tile directories out <- tiles_DEM4Deriv(i, tile.tbl, in.covs, out.path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.