rasterStewart: Create a Raster from a Stewart Regular Grid

View source: R/stewart.R

rasterStewartR Documentation

Create a Raster from a Stewart Regular Grid

Description

This function creates a raster from a regularly spaced Stewart points grid (output of the stewart function).

Usage

rasterStewart(x, mask = NULL)

Arguments

x

sp or sf object; output of the stewart function.

mask

sp or sf object; this object is used to clip the raster. (optional)

Value

Raster of potential values.

See Also

stewart, quickStewart, plotStewart, CreateGrid, CreateDistMatrix.

Examples

library(raster)
data(hospital)
# Compute Stewart potentials from known points (hospital) on a
# grid defined by its resolution
mystewart <- stewart(knownpts = hospital, varname = "capacity",
                     typefct = "exponential", span = 1000, beta = 3,
                     resolution = 100, mask = paris)
# Create a raster of potentials values
mystewartraster <- rasterStewart(x = mystewart, mask = paris)
plot(mystewartraster)

Groupe-ElementR/SpatialPosition documentation built on Sept. 14, 2023, 6:14 a.m.