rsaga.target {RSAGA}R Documentation

Define target grid for interpolation

Description

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

Usage

rsaga.target(target = c("user.defined", "grid.system", 
    "target.grid", "header"),
    user.cellsize = 100, user.fit.extent = TRUE,
    user.x.extent, user.y.extent, user.bbox,
    system.nx, system.ny, system.xy, system.d,
    target.grid, header)

Arguments

target character: method used for defining the target grid
user.fit.extent Only for target="user.defined": logical; if TRUE, use the dimensions of an input grid supplied to the SAGA module, e.g. to rsaga.ordinary.kriging. The other user.* variables should not be provided if user.fit.extent=TRUE.
user.cellsize Only for target="user.defined": raster resolution
user.x.extent, user.y.extent Only for target="user.defined": numeric vectors of length 2: minimum and maximum coordinates of grid cell center points
user.bbox Only for target="user.defined": alternative way of specifying extent (either use bbox OR user.*.extent): 2x2 matrix of the form rbind(user.x.extent,user.y.extent).
system.nx, system.ny Only for target="grid.system": number of columns and rows of the grid
system.xy Only for target="grid.system": numeric vector of length 2 giving the x and y coordinates at the center of the grid's lower left cell
system.d Only for target="grid.system": cellsize
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
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.

Note

This function is to be used with RSAGA functions rsaga.ordinary.kriging, rsaga.inverse.distance, rsaga.nearest.neighbour and rsaga.modified.quadratic.shephard.

Author(s)

Alexander Brenning

See Also

read.ascii.grid.header

Examples

## Not run: 
# Krige attribute 0 from the points shapefile to
# a grid with the same extent and resolutionn as the
# (pre-existing) geology grid:
rsaga.ordinary.kriging("points", "dem", field = 0, maxdist = 1000,
    target = rsaga.target(target="target.grid",
    target.grid = "geology"))
# Specify a target grid manually (see above):
rsaga.ordinary.kriging("points", "dem", field = 0, radius = 1000,
    target = rsaga.target("grid.system", 
        system.nx = 200, system.ny = 300,
        system.xy = c(604853,7465013), system.d = 50))
## End(Not run)

[Package RSAGA version 0.9-6 Index]