You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do we want to allow for points and develop MRFs for them?
Our best idea so far is to use a Voronoi tessellation to turn a given point set into a polygon set, but with non-convex point sets, we get odd issues. Basically, points that are far apart but at the edge of the area can be connected by this.
library(sf)
library(ggplot2)
set.seed(1)
#simulate some new data that falls in a crescent shapenew_data= data_frame(x= rnorm(600),y=rnorm(600))%>%
filter(x^2+y^2<=1)%>%
filter((x-0.2)^2+ (y-0.2)^2>0.6)%>%
st_as_sf(coords= c("x","y"))
ggplot(new_data) + geom_sf()
#Create a Voronoi tesselation that we can get adjacency fromnew_voronoi<- st_combine(new_data) %>%
st_voronoi()%>%
st_cast()
#Plot it plus the original data
ggplot(new_voronoi) +geom_sf() + geom_sf(data=new_data)
#We can clip this to the convex hull easily, but how do we deal with the tails connecting?new_voronoi %>%
st_intersection(st_convex_hull(st_combine(new_data)))%>%
ggplot() +
geom_sf()+
geom_sf(data=new_data)
The text was updated successfully, but these errors were encountered:
Do we want to allow for points and develop MRFs for them?
Our best idea so far is to use a Voronoi tessellation to turn a given point set into a polygon set, but with non-convex point sets, we get odd issues. Basically, points that are far apart but at the edge of the area can be connected by this.
The text was updated successfully, but these errors were encountered: