[GRASS-stats] rgrass7: readVECT() issue with drivers other than ESRI Shapefile
neteler at osgeo.org
Wed Jun 17 03:31:59 PDT 2015
I am trying to get vector data from GRASS GIS 7 into R using rgrass7.
The default driver is SHAPE which is not able to maintain the longer
than 10 chars column names etc. So I tried GeoJSON which would do the
job, yet I get:
> mydata <- readVECT("table_2010_2014", driver="GeoJSON")
Error in .read_vect_non_plugin(vname = vname, layer = layer, type = type, :
Requested driver GeoJSON not supported
Where does the error message come from? I guess R?
So, reading ?readVECT I see:
driver: default ‘"ESRI Shapefile"’; a valid OGR writable driver name
to define the file format for intermediate files, one of
‘c("GML", "SQLite"), c("ESRI_Shapefile", "MapInfo_File")’
Is there any reason that GeoJSON is excluded?
Trying with GML (since I really need to preserve the column names) it fails:
> mydata <- readVECT("table_2010_2014", driver="GML")
Error in paste(gtmpfl1, shname, sep = .Platform$file.sep) :
object 'shname' not found
Likewise also the SQLite driver fails...
Guess I'm missing something...
More information about the grass-stats