sf_to_rast | R Documentation |
Function for computing a continuous raster map from a sf object by interpolating the sf values. For the interpolation Inverse Distance Weighting (IDW) is beeing used.
sf_to_rast(
observer,
v,
aoi = NULL,
max_distance = Inf,
n = Inf,
beta = 2,
raster_res = NULL,
spacing = raster_res,
na_only = FALSE,
cores = 1,
progress = FALSE
)
observer |
object of class |
v |
character; Name of a variable in |
aoi |
optional; object of class |
max_distance |
numeric; Only observer locations within the buffer distance from the prediction location are used for interpolation |
n |
numeric; Number of nearest observer locations that should be used for the interpolation |
beta |
numeric; Inverse istance power, β, determines the degree to which the nearer observer locations are preferred over more distant points |
raster_res |
numeric; Resolution of the interpolatet raster map that is returned |
spacing |
optional; numeric; Only if |
cores |
numeric; The number of cores to use, i.e. at most how many child processes will be run simultaneously |
progress |
logical; Show progress bar? |
observer
needs to be a geometry of type POINT, LINESTRING, MULTILINESTRING, POLYGON or MULTIPOLYGON. If observer
is a LINESTRING or MULTILINESTRING,
points will be generated along the line(s) every raster_res
meters. If observer
is a POLYGON or MULTIPOLYGON, a grid with resolution = raster_res
will be generated as the obersver locations.
The CRS (st_crs
) needs to have a metric unit!
object of class rast
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.