Learn R Programming

RSAGA (version 0.94-5)

rsaga.target: Define target grid for interpolation

Description

Define the resolution and extent of a target grid for interpolation by SAGA modules based on (1) user-provided x/y coordinates, (2) an existing SAGA grid file, or (3) the header data of an ASCII grid. Intended to be used with RSAGA's interpolation functions.

Usage

rsaga.target(target = c("user.defined", "target.grid", "header"), user.cellsize = 100, user.x.extent, user.y.extent, target.grid, header, env = rsaga.env())

Arguments

target
character: method used for defining the target grid
user.cellsize
Only for target="user.defined": raster resolution (in the grid's map units)
user.x.extent
See user.y.extent
user.y.extent
Only for target="user.defined": numeric vectors of length 2: minimum and maximum coordinates of grid cell center points
target.grid
Only for target="target.grid": character string giving the name of a SAGA grid file that specifies the extent and resolution of the target grid; this target grid file may be overwritten, depending on the specifics of the SAGA GIS module used.
header
Only for target="header": list: ASCII grid header (as returned e.g. by read.ascii.grid.header) or defined manually; must at least have components ncols, nrows, cellsize, and either x/yllcorner or x/yllcenter.
env
A SAGA geoprocessing environment, see rsaga.env.)

See Also

read.ascii.grid.header

Examples

Run this code
## Not run: 
# # IDW interpolation of attribute "z" from the point shapefile
# # 'points.shp' to a grid with the same extent and resolution
# # as the (pre-existing) geology grid:
# rsaga.inverse.distance("points", "dem", field = "z", maxdist = 1000,
#     target = rsaga.target(target="target.grid",
#     target.grid = "geology"))
# ## End(Not run)

Run the code above in your browser using DataLab