Esri’s file geodatabase (GDB) is a proprietary data storage format designed for managing, querying, and analyzing spatial and non-spatial data within the ArcGIS software ecosystem. As the name implies, a file geodatabase is a series of files stored in within a folder. The folder name is appended with the extension .gdb.
Esri file geodatases can be used to store vector and raster GIS datasets.
Despite the proprietary nature of Esri file geodatabases, these geospatial datasets can be viewed within QGIS using GDAL drivers. Here are instructions for how to view both vector and raster GIS data that is stored in file geodatabase format in QGIS.
Viewing vector file geodatabase in QGIS
Viewing a vector file geodatabase is pretty easy in QGIS. To do so, navigate to the folder where a file geodatabase is stored. The folder will be in the format of: <foldername>.gdb.
Method 1: Drag and drop vector file geodatabases into QGIS
Simply grab the .gdb folder and drop it into the layers pane or the map canvas area in QGIS. Your computer’s cursor will turn into a green plus sign when you hover the dragged folder into either of these two areas.
Free weekly newsletter
Fill out your e-mail address to receive our newsletter!
By entering your email address you agree to receive our newsletter and agree with our privacy policy.
You may unsubscribe at any time.
Method 2: Use the Add vector layer option
Alternatively, you can use the add vector layer option to load the file geodatabase into QGIS.
To start, file select Layer from the top QGIS menu item. Then select Add Layer -> Add Vector Layer… from the menu.
This will launch the Data Source Manager interface in QGIS. Select “Directory” as the source type as the file geodatabase is a collection of file stored in a folder with a .gdb extension.
In the Source section, select “OpenFileGDB”. Next click on the … to the right of the Vector Dataset(s) information box and navigate to the location on your computer where the file geodatabase folder is stored. When you have set the file pathname, click on the “Add” button located at the bottom right of the interface.
Once the file geodatabase has been loaded into QGIS, the GIS data can be symbolized, have labels applied, and have the attribute information queried. The file geodatabase is view only so you will not be able to edit the GIS data that it contains. To do so, you would need to export the dataset into a file format that QGIS can edit.
Viewing a raster file geodatabase in QGIS
Viewing a raster file geodatabase in QGIS is dependent on the version of GDAL that you have installed. The ability to load read access raster file geodatabases was added to GDAL versions 3.7 or higher. If you are running an instance of QGIS with a lower version of GDAL you will not be able to view raster file geodatabases.
Error message trying to load a raster file geodatabase
If you try to drag and drop a file geodatabase into QGIS with a version of GDAL that is under 3.7 you will be presented with this error message: Invalid Data Source: /<file pathname>/<geodatabase name>.gdb/ is not a valid or recognized data source.
Checking the version of GDAL in QGIS
To check your version of GDAL that was installed with QGIS, go to the QGIS menu item and select about. There a list of the QGIS version along with installed packages and versions are listed.
Running too low of a version of GDAL is particularly problematic with Mac OS users of QGIS. A note on the QGIS download page states, “The Mac packages are currently behind waiting for renewed certificates.”. The most recent version of QGIS 3.36,.3 named Maidenhead. A look at the About page for this version shows that GDAL is only at 3.3.2.
A workaround is to use the experimental installer to install a more up-to-date version of QGIS along with more updated versions of the various packages that supplement QGIS. To do this visit the Github page that hosts the QGIS installer packages from conda.
From there, select the Mac OS version and run the installation package. As these are experimental installers, the installation process is not always smooth or without instability issues. Once installed, a look at the About page for QGIS shows more up-to-date packages along with a more recent version of QGIS.
Adding rector file geodatabases in QGIS
Once you have a version of QGIS installed that is running GDAL version 3.7 or higher, you can either use the drag and drop method to add a raster file geodatabase or use the Browser pane to add it.
Using Browser to add a raster file geodatabase
The Browser is similar to the Finder tool for Mac OS or Windows Explore on a PC. This pane in QGIS lets you navigate through your computers file folder structure. To add this page go to View –>
Once the Browser pane is turned on, you can then use it to navigate to the raster file geodatabase folder. The file geodatabase will have an icon of a drum with an arrow to the left of the icon. If you click on the arrow, any raster datasets stored within the file geodatabase will be shown with the checkerboard raster icon.
Grab the raster file and drag it down into the layers pane. The raster file geodatabase will then load in QGIS.
As the the vector file geodatabase, this is read access only. You can stylize the file geodatabase but you will not be able to edit the file.
To be able to edit the raster database you will have to first export the data to a file format that QGIS can edit. Right click on the file geodatabase in the Layers pane and select export and then chose a raster GIS data format from the select. Then load that exported file into QGIS to do any edits.