I recently updated R and all of it's packages, and my code for reading in the layers of a geodatabase no longer works.
It works fine on my windows desktop, but doesn't work on my macbook (I change the filepath for the appropriate machine).
I get the same behaviour with any shapefile or geodatabase at any file path.
I'm essentially following the instructions listed here: Cannot open data source. .GDB in R
filegdblist <- paste("/Volumes/LaCie/2019 PRISM GIS clean/", list.files("/Volumes/LaCie/2019 PRISM GIS clean/"), sep = "")
subset(ogrDrivers(), grepl("GDB", name))
fc_list <- lapply(filegdblist, ogrListLayers)
Error in FUN(X[[i]], ...) : Cannot open data source
What strikes me as weird is that the results of other functions leads me to believe this should be working fine.
file.exists(filegdblist[1])
[1] TRUE
list.files(filegdblist[1])
[1] "a00000001.freelist"
[2] "a00000001.gdbindexes"
[3] "a00000001.gdbtable"
[4] "a00000001.gdbtablx"
.....
Any suggestions as to what I should investigate?
question from:
https://stackoverflow.com/questions/65852391/ogrlistlayers-cannot-open-data-source 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…