[GRASS-stats] rgrass7: readVECT() issue with drivers other than ESRI Shapefile
Roger Bivand
Roger.Bivand at nhh.no
Wed Jun 17 03:41:21 PDT 2015
Hi,
This has been lagging and needs attention - please provide a reproducible
example. A work-around may also be to copy across the column names, but
driver= is never regularly tested, and probably should be. rgrass7 uses:
nc_basic_spm_grass7
Roger
On Wed, 17 Jun 2015, Markus Neteler wrote:
> Hi,
>
> 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...
>
> best,
> Markus
> _______________________________________________
> grass-stats mailing list
> grass-stats at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-stats
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
More information about the grass-stats
mailing list