在R中用SpatialPolygons覆盖SpatialLines(Overlaying SpatialLines by SpatialPolygons in R)

编程入门 行业动态 更新时间:2024-10-24 09:23:50
在R中用SpatialPolygons覆盖SpatialLines(Overlaying SpatialLines by SpatialPolygons in R)

我有一个表示道路的SpatialPolygons对象和一个包含城市的SpatialPolygons对象。

我想知道如何通过R中的SpatialPolygons对象覆盖SpatialPolygons对象。

我想知道经过两个城市和哪些城市的线路?

可能吗?

I have a SpatialLines object representing roads and a SpatialPolygons object containing cities.

I'd like to know how to overlay a SpatialLines object by a SpatialPolygons object in R.

I'd like to know the Lines that passes over the two cities and which cities in?

Is it possible?

最满意答案

通常,空间对象的叠加由sp包中的over函数处理。 在over ( ?over )文档的Methods部分中,有一个over方法列表,它不包括Lines和Polygons的组合。 幸运的是, over的文档说通过安装rgeos包,可以使用这些方法。

In general, overlays of spatial objects are handled by the over function from the sp package. In the Methods section of the documentation of over (?over) there is a list of methods for over, which does not include the combination of Lines and Polygons. Luckily, the documentation of over says that by installing the rgeos package these kind of methods are made available.

更多推荐

本文发布于:2023-08-04 12:48:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1415942.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中用   SpatialPolygons   Overlaying   SpatialLines

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!