Description Usage Arguments Examples
Function for creating a numeric vector showing the smallest distance between the feature in the primary sf object and all features in the second object
1 | st_min_dist(x, y)
|
x |
the primary sf object |
y |
the second sf object |
1 2 3 4 5 6 | library(sf)
records <- readxl::read_excel(system.file("data/records.xlsx", package = "ALERC")) %>%
st_as_sf(coords = c("Easting", "Northing"), crs = 27700)
sssi <- st_read(system.file("data/SSSI.shp", package = "ALERC")) %>%
st_set_crs(27700)
records$DistFromSSSI <- st_min_dist(records, sssi)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.