6

How do you incorporate support for ESRI's fgdb format into GDAL / ogr2ogr on Mac OS X 10.8?

7

Well, self, I'm glad you asked (hopefully you won't have to spend a whole day figuring this out next time).

Steps

  1. Download the ESRI File Geodatabase API Library (requires account)
  2. Move the resultant FileGDB_API folder to /usr/local/
  3. Copy all the files from (or symlink for cleaner in/uninstall)
    • /usr/local/FileGDB_API/include/ ---> /usr/local/include
    • /usr/local/FileGDB_API/lib/ ---> /usr/local/lib
  4. Run brew install gdal --enable-unsupported
    • brew requires the invaluable homebrew package manager to be installed
    • I personally had to add --without-python to 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.

Inspiration

I found a few, disparate articles that really helped me put this all together into a cohesive piece

  • 2
    Having done this so many different ways, I would say that Homebrew is the way to go :) – Ragi Yaser Burhum Dec 10 '12 at 19:19
1

This did not work for me for OS X 10.11. Glad I found this:

The gist of it:

  1. brew tap osgeo/osgeo4mac
  2. Download FileGDB API for http://appsforms.esri.com/products/download/#File_Geodatabase_API_1.3 and place it in Homebrew Cache Directory
  3. brew install gdal-filegdb
  • Since Esri has released the fileGDB API under an Apache 2.0 license, it's no longer necessary to separately download the API source from Esri ). The current osgeo4mac bottle is called osgeo-gdal-filegdb (e.g. brew install osgeo-gdal-filegdb) – Mark Egge Jan 8 '20 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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