Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Following questions:

Open Source Tool capable of reading Esri File Geodatabase (.gdb)?

How to access file geodatabase in Qgis?

How to get FGDB support in GDAL 1.9 without compiling?

I have spent around 2 days to find the way to open GDB (Esri geodatabase) in QGIS (or any other open source software) but still without success.

I have downloaded the newest OSGeo4W installer and run the setup - express desktop install - all packages

And there was no support for GDB in QGIS. So I tried again in advanced way - advanced install - checked: All - Libs - gdal-filegdb: OGR FileGDB Driver (Current version 1.9.0-1) - reinstall: All qgis and gdal (gdb) files I have found

And nothing, still no support. Just desperate I have copied FileGDBAPI.dll and ogr_FileGDB.dll to OSGeo4W\apps\qgis\plugins folder, reinstalled all again, nothing...

Can you please describe more detailed procedure? Please include installation and how to open .gdb in QGIS (OSGeo4W installation)

share|improve this question
1  
What version of gdal are you using? –  Nathan W May 28 '12 at 4:24
    
First I have installed osgeo4w-setup - Express desktop install - which I guess download the newest library for instalation. In "Advanced Install" I tried gdal 1.9.1-RC2-1 and 1.9.0-3. Talking about gdal-filegdb there is only 1.9.0-1 version at this moment. –  Miro May 28 '12 at 5:23
    
What version of ArcGIS was your File GDB created in? –  Get Spatial May 28 '12 at 23:46
1  
Well this may be the problem - "File GDB must be ArcGIS version 10, 9.3.1 is not supported." - I don't know the version of ESRI File Geodatabase (FileGDB), I just got data. Going to find and test some data in version 10 with my install and let know. –  Miro May 29 '12 at 1:13
    
Ok, tried with "test_fgdb.gdb" from trac.osgeo.org/gdal/wiki/FileGDB and still got message "test_fgdb.gdb is not a valid or recognized data source". –  Miro May 29 '12 at 1:30

4 Answers 4

up vote 61 down vote accepted

Update July 2015

It is time to bring this answer a bit more current as some elements of FileGDB support in QGIS have changed. I am now running QGIS 2.10.0 - Pisa. It was installed using the OSGeo4W installer.

What has changed is that upon the basic install of QGIS, File GDB read-only access is enabled by default, using the Open FileGDB driver. Credit for first noting this must be given to @SaultDon.
Read/Write access may be enabled using the FileGDB driver install through the OGR_FileGDB library. The library needs to be enabled using the process below, either when you install QGIS, or individually. More detail about the drivers is below:

  • FileGDB driver: Uses the FileDB API SDK from ESRI - Read/Write to FGDB's of ArcGIS 10 and above
  • OpenFleGDB driver: Available in GDAL >= 1.11 - Read Only access to FGDB's of ArcGIS 9 and above

When you add a Vector Layer, you simply choose the Source Type based on the driver you want to use.
ESRI FileGDB Driver Esri FileGDB Driver

Open FileGDB Driver Open FileGDB Driver

The process below shows in more detail the steps to install QGIS from the OSGeo4W installer, ensure the OGR_FileGDB library is installed, then load layers from a File Geodatabase.

  1. Download and run osgeo4w-setup-x86.exe for 32bit or osgeo42-setup-x86_64.exe for 64bit from OSGeo4W

  2. Choose Advanced Install, then Install from Internet. Choose your root and local package directories, and then your connection type, in my case, "Direct Connection". Once you click next, it will bring up a screen with a number of collapsed menus: Select Installation Packages

  3. Expand the "Desktop" menu. Find the entry for "qgis: Quantum GIS (desktop)". In the "New" column, change entry from "Skip", to show version 2.10.0-1. Choose QGIS install entry

  4. Expand the "Libs" menu. Find the entry for "gdal-filegdb: OGR FileGDB Driver". In the "New" column, change the entry from "Skip", to show version 1.11.2-1. Select GDAL File GDB Driver

  5. Once you click Next, it will install QGIS and all of the associated libraries. Once this is completed, open Quantum GIS, and Choose "Add Vector Data". Change the option to "Directory". This is where you choose the driver as shown above. Choose FileGDB directory and driver

  6. Browse to the File Geodatabase and select the directory. Click "Open" Select File GDB location

  7. Select a Vector Layer and press "Ok". Please note that the FileGDB API Does not support Raster Images. Select Vector Layer

  8. As you can see, the selected layer loads in. Using the Esri driver, editing is possible. If you use the Open FileGDB driver, the data is read only. Loaded vector layer in QGIS

  9. For your reference, here is the "About" window from my install of QGIS, showing the versions of the software, and the GDAL/OGR library being used. QGIS About Window

This install was performed on a Windows 7 64bit computer. With previous installers, there were some inconsistent results. This may have changed with the switch to the 32 or 64bit installers. This thread at OSGeo discusses some old issues people were experiencing: Thread

share|improve this answer
1  
FileGDBAPI.dll is part of the gdal-filegdb package and should already be installed in %osgeo4w_root%\bin. Unfortunately, that alone is not enough on my system either. –  matt wilkie May 28 '12 at 19:04
    
@mattwilkie - I don't know if this makes a difference, but what is the file version of your FileGDBAPI.dll? Mine is 1.2.0.136. What happens when you try to open a .gdb directory? –  Get Spatial May 28 '12 at 19:18
    
My file version is same, last modified 23-Feb-2012 2:20pm, 4,616,048 bytes.I'm told "test.gdb is not a valid data source" (using directory type). I see from here that others have had trouble reliably getting the ability to open file-gdb's in qgis installed by osgeo4w. I also tried copying FileGDBAPI.dll to the qgis bin directory and ogr_FileGDB.dll to the qgis gdalplugins directory as per here. –  matt wilkie May 28 '12 at 19:31
3  
found the bug, and it's a whopper: The FileGDB SDK doesn't support custom coordinate systems (gdal #4578). One hopes that is not a long lived limitation; vote for fixing it at ideas.arcgis.com/ideaView?id=087E00000004DpoIAE –  matt wilkie May 31 '12 at 19:53
3  
@danagerous - This answer was written when QGIS 1.8 was the current install version. As you have shown, the current version is now up to 2.2.0. The process and steps to ensure that the library is installed remain the same, but you would always want to use the most current version available for both QGIS and the gdal-fgdb library. –  Get Spatial Apr 2 '14 at 17:24

i had a related problem/question some 3 months ago (see: qgis 2.8.1 arcgis filegdb incomplete list in win-version)

a few days ago i've switched from 2.8.x to 2.10.1-Pisa hoping to get rid of the file geodatabase issues discribed in my question. unfortunately without beeing successfully.

what i've figured out since then is: there still seems to be a problem with custom coordinate systems ! my tests with a filegdb created with arcgis 10.1 and another one with arcgis 10.3 on different pcs show that trying to open a filegdb that just contains feature classes with custom CRS returns the following error:
"Invalid Data Source: D:\xxxx\yyy\zzzz.gdb is not a valid or recognized data source"

... both drivers (FileGDB driver, OpenFileGDB driver) return the same error !
while Can FileGDB SDK be made to support custom coordinate systems? article and some of the comments/answers here state that custom CRC support via OpenFileGDB is implemented - it doesn't work on my systems (gdal-filegdb: OGR FileGDB Driver 1.11.2-1)

if the filegdb contains any tables - just these tables are displayed in "select vector layers to add ..." list and mixing custom CRC- and non-custom data with looks like this

arccatalog:

filegdb content arccatalog

qgis 2.10:

filegdb content qgis (FileGDB driver and OpenFileGDB driver)

my personal conclusion: always use standard CRCs ! ! !

share|improve this answer

If you are on a Mac you can compile the filegdb driver from scratch using these instructions.

UPDATE: It has been 2 years since this answer, you may want to try this now: https://github.com/OSGeo/homebrew-osgeo4mac Also, as many say now, you can use the OpenFileGDB driver which does not use the ESRI binaries to accomplish this. Please be mindful that it is a project that has reversed-engineered how the spec works and not ESRI sanctioned (still is great to have alternatives and it represents amazing work).

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

1  
The linked page relies on its first link ("Download the SDK from ESRI's website"), which is dead now. –  Pavel V. Mar 14 '14 at 12:54
    
Well, the answer was from 2012. :) In the past three years, many changes have happened. You can compile without any special magic using homebrew and it is available in the OSGeo Windows distribution, too. –  Ragi Yaser Burhum Jul 20 at 12:55
1  
Could you edit and give instructions on how to compile using homebrew? In particular - is the homebrew installation compatible with the KyngChaos gdal-complete installer? –  Simbamangu Jul 22 at 7:11
    
If you are using homebrew you should stay away from the KyngChaos binaries or you can potentially have problems during compilations since you will end up with multiple versions of gdal. –  Ragi Yaser Burhum Jul 27 at 17:30

If you have QGIS running and compiled against GDAL 1.11.0, it now has native FileGDB support via the OpenFileGDB driver.

To open a geodatabase in QGIS, be sure to choose "Add vector layer", "Source Type = Directory" and source should be either "OpenFileGDB" or "ESRI FileGDB". Then just browse to the *.gdb folder of choice, press "Open" and the layers will be loaded into your Table of Contents.

There are some current limitations like not being able to write to a FileGDB, but it supports FileGDBs <= 10.0 which is quite a bonus and "custom projections".

The work-in-progress reverse-engineered specification is available on GitHub for the OpenFileGDB driver.

share|improve this answer
1  
Thank you for posting this ... it's much shorter than the other answer (which I also appreciate, but if it's no longer necessary to go through all those steps, I'm grateful to know it!) –  LarsH Jan 29 at 22:20

protected by Community Jun 3 '14 at 7:42

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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