Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tile_geoprocessor

Split a raster grid into tiles for tile-based processing


Description

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.

Usage

tile_geoprocessor(x, grid, nx, ny, overlap = 0, file_path = NULL)

Arguments

x

A 'saga' object.

grid

A path to a GDAL-supported raster to apply tiling, or a RasterLayer.

nx

An integer with the number of x-pixels per tile.

ny

An integer with the number of y-pixels per tile.

overlap

An integer with the number of overlapping pixels.

file_path

An optional file file path to store the raster tiles.

Value

A list of RasterLayer objects representing tiled data.

Examples

## Not run: 
# 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)

## End(Not run)

Rsagacmd

Linking R with the Open-Source 'SAGA-GIS' Software

v0.1.0
GPL-3
Authors
Steven Pawley [aut, cre]
Initial release
2021-01-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.