[R-sig-Geo] Dumping OGR database to dataframe(s)?

Jonathan Greenberg greenberg at ucdavis.edu
Tue Aug 4 00:53:10 CEST 2009


R-sig-geo'ers:

    I'm pushing forward with recoding starspan as a set of R functions 
so we can get the program back on track after a long hiatus with the 
development of a C version (I don't know C and don't have time to learn 
it, and we lost our master programmer who did know C), and I'm trying to 
decide if I should allow the vector side of the program to specifically 
require shapefiles, or to allow it to be more flexible and allow any 
type of ogr-readable file.  Here are a couple of questions:

1) Is there a command to dump the database(s) of any ogr file to a 
dataframe, regardless of the data type?  Right now, all I have found is 
that I need to use the read.dbf() function in the shapefiles library for 
a shapefile-associated DBF.
2) Is there any way to figure out the particular driver (aka file type) 
of a file I'm trying to read with ogr without needing the layer name?  
Alternatively, is there any way to list the layer names of an ogr file?

    Thanks -- I'm going to try to make a release of starspan in the next 
few weeks to have people try it out...

--j

-- 
Jonathan A. Greenberg, PhD
Postdoctoral Scholar
Center for Spatial Technologies and Remote Sensing (CSTARS)
University of California, Davis
One Shields Avenue
The Barn, Room 250N
Davis, CA 95616
Cell: 415-794-5043
AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307



More information about the R-sig-Geo mailing list