我想从下面的光栅对象(r1)创建轮廓线(50%,75%,95%),可以将其传输到ArcGIS。但我总是收到错误消息:“错误:继承(obj,”Spatial“)不是”。“
"abc0"
答案 0 :(得分:0)
请尝试以下操作:
library(sp)
library(maptools)
l = quantile(r1[], c(.05, .5, .95))
sl = ContourLines2SLDF(contourLines(as.image.SpatialGridDataFrame(as(r1, "SpatialGridDataFrame")), levels = l))
library(rgdal)
writeOGR(sl, ".", paste("r1"), driver="ESRI Shapefile")