Questions tagged «maptools»

3
将多个SpatialPolygonDataFrames合并到R中的1个SPDF中?
我在QGIS中创建了2个多边形。在R中使用它们,多边形将自动变为SpatialPolygonsDataFrame(SPDF)。我想将它们合并为单个SPDF(这在ArcGis中使用Tool Merge极为简单)。我确信应该有一种简单的方法来完成R中的操作,但是我找不到方法。该合并功能似乎只合并data.frames,聚合函数溶解多个多边形为一个SHP,gIntersect(由打字加入功能)返回逻辑值,而不是在所有的SPDF。 数据可在此处获取:http : //ulozto.cz/xpoo5jfL/ab-zip library(sp) library(raster) library(rgeos) library(spatstat) library(rgdal) library(maptools) setwd("C:/...") a<-readOGR(dsn=getwd(), layer="pol.a") b<- readOGR(dsn=getwd(), layer="pol.b") ab<-merge(a, b) # what tool if not "merge" to use??
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.