Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get data in R from an ESRI v10 Geodatabase

Tags:

r

esri

spatial

Does anyone know of a method to get (raster) data out of an ESRI v10 File Geodatabase in R?

ESRI offers a C++ API (for Linux and Windows), so I guess in principle it should be possible for an R package to retrieve (and write) data to a Geodatabase. I could not find any packages capable of doing this though.

like image 776
Stefan Avatar asked Dec 10 '12 18:12

Stefan


2 Answers

Apparently rgdal now supports file geodatabase read access:

library(rgdal)
subset(ogrDrivers(), grepl("GDB", name))
ogrListLayers("/path/to/folder.gdb")

Worked for me on Windows, R v3.2.0, rgdal v0.9-3.

like image 100
mikeck Avatar answered Sep 23 '22 16:09

mikeck


A quick google led me to the following page:

http://www.gdal.org/ogr/drv_filegdb.html

Which suggest gdal supports file geodatabase. Probably, R then also supports the format through a properly built rgdalpackage. In essence, if the standalone gdal has support, the rgdal package built against that should also read the file geodatabase.

like image 43
Paul Hiemstra Avatar answered Sep 23 '22 16:09

Paul Hiemstra