top of page

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

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)

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

Featured Posts
Check back soon
Once posts are published, you’ll see them here.
Recent Posts
Archive
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page