How to read an ESRI file geodatabase feature class in R?

June 20, 2015

It is now possible to read ESRI feature classes in a file geodatabase using R. The geospatial community has been looking for this functionality for some time now.  R's spatial capabilities are now that much stronger.  Here is how you can access and explore feature classes in R using rgdal:

 

##################################

 

require(rgdal)

 

# The input file geodatabase

fgdb = "C:/path/to/your/filegeodatabase.gdb"

 

# List all feature classes in a file geodatabase

subset(ogrDrivers(), grepl("GDB", name))

fc_list = ogrListLayers(fgdb)

print(fc_list)

 

# Read the feature class

fc = readOGR(dsn=fgdb,layer="some_featureclass")

 

# Determine the FC extent, projection, and attribute information

summary(fc)

 

# View the feature class

plot(fc)

 

##################################

 

Please reload

Featured Posts

I'm busy working on my blog posts. Watch this space!

Please reload

Recent Posts
Please reload

Archive
Please reload

Search By Tags
Please reload

Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square

© Red Fox GIS & Remote Sensing