`risk_layer.Rd`

Compute a raster map from the input layer and rescale with a linear relationship.

risk_layer(x, boundaries, scale_target = c(0, 100))

x | a Spatial*, RasterLayer or igraph object |
---|---|

boundaries | a Spatial* object, used to determine the boundaries of the computed risk layer. |

scale_target | numeric vector of length 2. New scale. |

A RasterLayer object in the new scale.

For Spatial* objects (geometries such as point, lines or polygons),
compute the `distance_map()`

, which gives a RasterLayer. For
`igraph`

objects (from network data), compute a RasterLayer
with the relative importance of the nearest node. For a RasterLayer
mask, extend or crop to the `boundaries`

as needed.

Finally, scale the RasterLayer outcome of any of the three input types. If you need an inverse relationship, just reverse the target scale.