rasterReilly | R Documentation |
This function creates a raster from a regularly spaced
Reilly grid (output of the reilly
function).
rasterReilly(x, mask = NULL)
x |
sp or sf object; output of the |
mask |
sp or sf object; this object is used to clip the raster. (optional) |
Raster of catchment areas values.
The raster uses a RAT (ratify
) that contains the
correspondance between raster values and catchement areas values. Use
unique(levels(rasterName)[[1]])
to see the correpondance table.
reilly, plotReilly.
library(raster)
data(hospital)
# Compute Reilly catchment areas from known points (hospital) on a
# grid defined by its resolution
myreilly <- reilly(knownpts = hospital, varname = "capacity",
typefct = "exponential", span = 1250, beta = 3,
resolution = 200, mask = paris, returnclass = "sf")
# Create a raster of reilly values
myreillyraster <- rasterReilly(x = myreilly, mask = paris)
plot(myreillyraster, col = rainbow(18))
# Correspondance between raster values and reilly areas
head(unique(levels(myreillyraster)[[1]]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.