我从 Excel 文件上的一系列点生成了 Voronoi 图。我想创建一系列具有相同半径的圆,每个圆都以第二个坐标数据集为中心,并确定每个点的相应重叠区域。
我使用了https://gis.stackexchange.com/questions/190917/r-voronoi-tesselation-from-long-lat-data中定义的函数将 Voronoi 镶嵌创建为 SpatialPolygonsDataFrame。但是,我不确定如何从第二个数据集中生成圆圈。我st_buffer
在定义的半径处使用,并尝试使用 转换 Voronoi 结果st_as_sf
,但这似乎不起作用。在尝试使用st_intersection
来确定区域时,我收到了错误st_crs(x) == st_crs(y)
,这似乎来自未定义坐标的 Voronoi 集。
我不确定哪个函数最适合使用,以及是否sf
有任何其他工具可用于输出 Voronoi 细分的每个部分与这些半径重叠的区域。
我从https://gis.stackexchange.com/questions/229453/create-a-circle-of-defined-radius-around-a-point-and-then-find-the-overlapping-a 中发现了类似的问题? noredirect=1&lq=1和https://gis.stackexchange.com/questions/140504/extracting-intersection-areas-in-r,但我找不到使这些方法与 Voronoi 函数兼容的方法。
我一直在使用的示例测试数据集包含在此处:
Hubs <- cbind('X Coord' = c(52.37639999,52.36989975,52.86299896,52.01011658,51.67409897,50.84980011,51.88669968,52.1048943,52.0746994),
'Y Coord' = c(4.894589901,4.876679897,6.493730068,4.703330517,4.548630238,5.687580109,4.491449833,5.0528496,4.310130119),
'Info 1' = c(13,15,62,24,9,46,73,97,69))
References <- cbind('X Coord' = c(51.88529968,52.3360136,52.37440109,51.92269897,51.9192276,51.43019867,52.0780896,51.90299988,52.04100037,50.98810196),
'Y Coord' = c(4.493549824,4.8750552,4.895800114,4.47382021,4.481627464,5.451980114,5.1470653,4.458670139,4.318089962,5.78059721))