View source: R/dist_to_sf_raster.R
Note that if a line/polygon sf object is provided, it is first rasterized to the reference raster and distance to the raster centroid of the cell in which the line passes through is used as the line coordinate.
1 | dist_to_sf_raster(sf_obj, ref_raster)
|
sf_obj |
An sf or sp object to calculate distance to |
ref_raster |
a reference raster with the extent and resolution of |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.