library(sf)
support <- st_as_sf(
data.frame(id = 1),
geometry = st_sfc(st_polygon(list(
cbind(c(0, 10, 10, 0, 0), c(0, 0, 10, 10, 0))
))),
crs = 32631
)
set.seed(42)
pts <- st_as_sf(
data.frame(id = 1:50),
geometry = st_sfc(lapply(1:50, function(i) {
st_point(c(runif(1, -5, 15), runif(1, -5, 15)))
})),
crs = 32631
)
result <- aoe(pts, support)
plot(result)
Run the code above in your browser using DataLab