如何从SF软件包中的嘈杂点找到多边形R

发布于 2025-02-01 17:57:45 字数 250 浏览 4 评论 0原文

我希望创建一个来自SF中一堆嘈杂点的多边形。我目前有很多大致构成正方形的点(请参见下图)。我想创建一个多边形的多边形,该多边形本质上适合大多数积分并忽略异常值。

I am looking to create a polygon derived from a bunch of noisy points in sf. I currently have many points that roughly make a square (see image below). I would like to create a polygon that essentially fits a square around the majority of points and ignores the outliers.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绝影如岚 2025-02-08 17:57:45

我认为,围绕这些要点的最小凸多边形,并且使用百分比可能会实现您想要的东西。可能还有其他方法,但是
在Adehabitathr软件包中,您需要将SF点转换为SP首先

library(sf)
library(adehabitatHR)


sp_points <- as_Spatial(sf_points)

mcp_poly <-mcp(sp_points, percent = 75)

I think that a minimum convex polygon around the points and playing with the percentage might achieve what you are looking for. There might be other methods but
in the adehabitatHR package you need to convert your sf points to sp first

library(sf)
library(adehabitatHR)


sp_points <- as_Spatial(sf_points)

mcp_poly <-mcp(sp_points, percent = 75)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文