vect2rast.SpatialPoints | R Documentation |
Converts object of class "SpatialPoints*"
to a raster map, and (optional) writes it to an external file (GDAL-supported formats; it used the SAGA GIS format by default).
vect2rast.SpatialPoints(obj, fname = names(obj)[1], cell.size, bbox, file.name, silent = FALSE, method = c("raster", "SAGA")[1], FIELD = 0, MULTIPLE = 1, LINE_TYPE = 0, GRID_TYPE = 2, ... )
obj |
|
fname |
target variable name in the |
cell.size |
(optional) grid cell size in the output raster map |
bbox |
(optional) output bounding box (class |
file.name |
(optional) file name to export the resulting raster map |
silent |
logical; specifies whether to print any output of processing |
method |
character; specifies the gridding method |
FIELD |
character; SAGA GIS argument attribute table field number |
MULTIPLE |
character; SAGA GIS argument method for multiple values — [0] first, [1] last, [2] minimum, [3] maximum, [4] mean |
LINE_TYPE |
character; SAGA GIS argument method for rasterization — [0] thin, [1] thick |
GRID_TYPE |
character; SAGA GIS argument for coding type — [0] integer (1 byte), [1] integer (2 byte), [2] integer (4 byte), [3] floating point (4 byte), [4] floating point (8 byte) |
... |
additional arguments that can be passed to the |
Returns an object of type "SpatialGridDataFrame"
.
Tomislav Hengl
vect2rast
## Not run: library(sp) data(meuse) coordinates(meuse) <- ~x+y # point map: x <- vect2rast(meuse, fname = "om") data(SAGA_pal) sp.p <- list("sp.points", meuse, pch="+", cex=1.5, col="black") spplot(x, col.regions=SAGA_pal[[1]], sp.layout=sp.p) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.