Split a raster grid into tiles. The tiles are saved as Rsagacmd temporary files, and are loaded as a list of R objects for further processing. This is a function to make the the SAGA-GIS grid_tools / tiling tool more convenient to use.
tile_geoprocessor(x, grid, nx, ny, overlap = 0, file_path = NULL)
A `saga` object.
A path to a GDAL-supported raster to apply tiling, or a SpatRaster.
An integer with the number of x-pixels per tile.
An integer with the number of y-pixels per tile.
An integer with the number of overlapping pixels.
An optional file file path to store the raster tiles.
A list of SpatRaster objects representing tiled data.
if (FALSE) { # \dontrun{
# Initialize a saga object
saga <- saga_gis()
# Generate a random DEM
dem <- saga$grid_calculus$random_terrain(radius = 15, iterations = 500)
# Return tiled version of DEM
tiles <- tile_geoprocessor(x = saga, grid = dem, nx = 20, ny = 20)
} # }