尝试从 esri shapefile 制作 spatstat 窗口

发布于 2024-12-21 02:41:13 字数 191 浏览 7 评论 0原文

我已将 shapefile 转换为 SpatialPolygons 类,并将其转换为带有 as(x, "owin") 的窗口,但我找不到任何可以使用的

ppp(x, y, poly= _______ )

内容 我必须获取 shapefile 才能将其用作窗口在 PPP 对象中?

谢谢

I've converted the shapefile to class SpatialPolygons and that to a window with as(x, "owin") but I can't find anything that will work with

ppp(x, y, poly= _______ )

What format do I have to get the shapefile in to use it as a window in a PPP object?

Thanks

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

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

发布评论

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

评论(3

離殇 2024-12-28 02:41:13

Baddeley 最近发布了一个小插图,描述如何将 spatstat 与 shapefile 结合使用:请参阅 http://cran.r-project.org/web/packages/spatstat/vignettes/shapefiles.pdf

Baddeley recently published a vignette that describes how to use spatstat with shapefiles: see http://cran.r-project.org/web/packages/spatstat/vignettes/shapefiles.pdf

漫雪独思 2024-12-28 02:41:13

如果你有一个 ppp 对象 x 和一个 owin 对象 W,那么你只需这样做
x <- x[W]

if you have a ppp object x and a owin object W, then you just do
x <- x[W]

云淡风轻 2024-12-28 02:41:13

如果您已经将多边形 shapefile 转换为 owin(窗口)对象 W,那么您只需使用该对象作为参数 window 即可函数 ppp:

X <- ppp(x, y, window=W)

之所以会出现混淆,是因为函数 ppp 允许用户以多种不同的方式指定边界窗口。本质上,它收集它无法识别的所有参数,并将它们传递给函数 owin,该函数使用它们来创建一个窗口。 ppp 无法识别参数 poly,因此它将被传递给 owin:请参阅 help(owin) 了解对此类论点的解释。

If you have already converted your polygon shapefile to an owin (window) object W, then you can simply use this object as the argument window to the function ppp:

X <- ppp(x, y, window=W)

The confusion arises because the function ppp allows the user to specify the bounding window in many different ways. Essentially it gathers any arguments that it does not recognise, and passes them to the function owin which uses them to make a window. The argument poly is not recognised by ppp so it would be passed to owin: see help(owin) for an explanation of such arguments.

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