Getting an error when trying to load a shapefile via readOGR. readOGR works fine on my personal computer (mac) but I am running into issues on my work computer (windows).
When loading a shapefile using the typical syntax, I get the following error:
Warning in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv, :
ogrInfo: all features NULL
Error in readOGR(dsn = ".", "shp_example") : no features found
For something reproducible, when I run the following code from the example from help(readOGR):
library(rgdal)
ogrDrivers()
dsn <- system.file("vectors", package = "rgdal")[1]
ogrListLayers(dsn)
ogrInfo(dsn)
I get the following warning after "ogrInfo(dsn)", telling me that all features are null. Note that I only get this error on my work computer; this error does not occur on my personal computer:
Warning in ogrInfo(dsn) : ogrInfo: all features NULL
Any ideas as to what is going on?
No comments:
Post a Comment