Description Usage Arguments Details Value Author(s) Examples
The border is extracted from shapes supplied in x-y format
1 | border_from_grid_points(df, delta)
|
df |
a data frame with fields |
delta |
the grid spacing. |
The algorithm works by finding how many neighbours a grid point has using fields::fields.rdist.near
. A grid point with less than 4 neighbours is assumed to be a border point. For this algorithm to work, it is important that the shape is ‘full’ and not contain any missing values.
a subset of df
containing the border points.
Andrew Zammit Mangion
1 2 3 | grid <- expand.grid(x = c(1:10), y = c(1:10))
names(grid) = c("x","y")
border_points <- border_from_grid_points(df=grid,delta=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.