How do you incorporate support for ESRI's fgdb format into GDAL / ogr2ogr on Mac OS X 10.8?
Well, self, I'm glad you asked (hopefully you won't have to spend a whole day figuring this out next time).
- Download the ESRI File Geodatabase API Library (requires account)
- Move the resultant
- Copy all the files from (or symlink for cleaner in/uninstall)
brew install gdal --enable-unsupported
brewrequires the invaluable homebrew package manager to be installed
- I personally had to add
--without-pythonto avoid issues with python support (numpy install issues)
Now, you should be able to, for example, convert fgdb files to better, more open formats by running
/usr/local/bin/ogr2ogr -f "GeoJSON" output_file.json input_file_gdb_folder
Why You Have to Manually Add FGDB Support
Support for ESRI's fgdb format can't be built into GDAL by default as it is a non-open source library. However, it can be added. Hence, the machinations above.
I found a few, disparate articles that really helped me put this all together into a cohesive piece
This did not work for me for OS X 10.11. Glad I found this:
The gist of it:
- brew tap osgeo/osgeo4mac
- Download FileGDB API for http://appsforms.esri.com/products/download/#File_Geodatabase_API_1.3 and place it in Homebrew Cache Directory
- brew install gdal-filegdb