rsaga.target: Define target grid for interpolation

Description Usage Arguments Note See Also Examples

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

1
2
3
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().)

Note

This function is to be used with RSAGA functions rsaga.inverse.distance(), rsaga.nearest.neighbour() and rsaga.modified.quadratic.shephard(). Note that these are currently only compatible with SAGA GIS 2.0.5 and higher.

See Also

read.ascii.grid.header()

Examples

1
2
3
4
5
6
7
8
9
## 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)

RSAGA documentation built on May 2, 2019, 11:01 a.m.