无法在光栅R中打开连接

时间:2018-01-25 00:22:41

标签: r crop raster intersect

我多次使用这些功能,它们工作正常,我的输入数据没有错!!

m<-raster::intersect(raster,shapefile)

n<-crop(raster, extent(shapefile))

我必须为大量数据执行此操作。因此,我尝试使用multicore来提高R的速度。我确实使用了here

中的 multicore.tabulate.intersect函数

但是,没有什么对我有用。然后,每当我运行交叉或裁剪功能时,我都会收到此错误:

  

m<-raster::intersect(raster,shapefile)

Error in file(fn, "rb") : cannot open the connection
In addition: Warning message:
In file(fn, "rb") :
  cannot open file '/private/var/folders/57/dn1sv79j3zzgy01h2l9v89v80000gn/T/Rtmpg5AYsm/raster/r_tmp_2018-01-23_235923_1432_19427.gri': No such file or directory

> n<-crop(raster, extent(shapefile))

Error in file(fn, "rb") : cannot open the connection
In addition: Warning message:
In file(fn, "rb") :
  cannot open file '/private/var/folders/57/dn1sv79j3zzgy01h2l9v89v80000gn/T/Rtmpg5AYsm/raster/r_tmp_2018-01-23_235923_1432_19427.gri': No such file or directory

我删除了R并重新安装了它,没有改变问题!!

我尝试重新安装光栅包,我觉得R找不到它:

install.packages("raster")'

The downloaded binary packages are in
    /var/folders/57/dn1sv79j3zzgy01h2l9v89v80000gn/T//RtmpKDG7bH/downloaded_packages

再次尝试交叉

    m<-raster::intersect(raster,shapefile)

Error in file(fn, "rb") : cannot open the connection
In addition: Warning message:
In file(fn, "rb") :
  cannot open file '/private/var/folders/57/dn1sv79j3zzgy01h2l9v89v80000gn/T/Rtmpg5AYsm/raster/r_tmp_2018-01-23_235923_1432_19427.gri': No such file or directory 

欣赏任何想法!!

0 个答案:

没有答案