我有一个表示道路的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.
更多推荐
发布评论