Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

File geodatabase (fgdb) includes numerous file geodatabase tables. As far as I know they exist as dbf files, but are within a Database.gdb.

In ArcCatalog, the file pathway resembles C:\Users\...\Database.gdb\Stats_AA.

How to read all of these dbf files into R (a statistical software)? What is the correct pathway to supply? The function used is read.dbf (in the foreign package).

Variants of

test<-read.dbf(file="C:/Users..Database.gdb/Stats_AA.dbf") 

and

test<-read.dbf(file="C:/Users..Database/Stats_AA.dbf") 

don't work. What's the correct "form" of the file name to be used, or, do I need to export all of the file geodatabase tables into some other form or location?

share|improve this question
1  
geodatabases store geometry in blob fields not dbf (but shapefile does). –  Mapperz Feb 1 '13 at 21:44
    
I was going to suggest using Esri's oledb provider for file geodatabases, however it appears that R cannot read oledb. Might want to upvote that question, and also this one. –  Kirk Kuykendall Feb 2 '13 at 14:59
add comment

2 Answers 2

up vote 2 down vote accepted

A simple solution is to use Table to dBase (multiple) to export your tables (Right click FGDB > Export > To dBase (multiple). You can also use this tool to export attribute tables contained within FGDB feature classes. Just drag and drop tables and or feature classes into the tool and specify an output folder. Of course, then you can loop through the folder containing the new dBase files using R.

enter image description here

enter image description here

share|improve this answer
    
This works- my dropdown menu doesn't look the same (I'm sorry, I don't fully understand ArcMap file systems) but I found I can export tables by right clicking on the table entry itself in the Table of Contents, and generate a readable .dbf file. Thanks! –  Nan Feb 2 '13 at 22:19
add comment

File geodatabases don't store their data as a dbf, shapefiles do. FGDB's use their own internal storage method.

ESRI's published an API, if use it to compile GDAL with file geodatabase support you might be able to use R's gdal plugins to get access to your data that way. However, the easiest solution is probably converting your data to shapefile, then you can use R's dbf tools.

share|improve this answer
    
Or just export the attribute table as a dbf rather than converting the entire feature class. –  Baltok Feb 1 '13 at 21:14
1  
Oh that's true! You can also use the Xtools toolbar to export the attribute table directly to Excel. The free version of the toolbar includes the Excel export ability. xtoolspro.com –  HeyOverThere Feb 1 '13 at 21:16
    
@HeyOverThere- thanks for pointing that out, you are correct- these tables are "File Geodatabase Tables" which explains why I couldn't find them as .dbf files. I'm going with Aaron's exporting approach, however, converting all of my data into shapefiles would be more time consuming. –  Nan Feb 2 '13 at 22:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.