Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
podcast
Filter by Categories
ArcGIS Pro
GDAL
GeoJson
Map
Python
QGIS
Uncategorized

Working with Esri File Geodatabase (gdb) Files in QGIS and GDAL

Geospatial professionals and enthusiasts often need to work with various GIS file formats, and one of the most common formats is Esri’s File Geodatabase (gdb). While gdb files are native to Esri’s ArcGIS software suite, there are times when you might need or prefer to work with these files in other GIS applications, such as QGIS or using the Geospatial Data Abstraction Library (GDAL).

In this blog post, we will explore how to open and work with gdb files in QGIS and GDAL. We’ll provide step-by-step instructions for opening gdb files in QGIS and an overview of how to read and convert data from gdb files using GDAL’s OpenFileGDB and FileGDB drivers. We’ll also discuss the levels of support for read and write access when using these tools, as well as any limitations or restrictions you may encounter.

Want to stay ahead of the geospatial curve? Listen to our podcast!

How to Open ESRI File (gdb) in QGIS

To open a gdb (geodatabase) file in QGIS, follow these step-by-step instructions:

  1. Launch QGIS: Open the QGIS software on your computer.
  2. Add Layer: In the main menu, go to “Layer” and then click on “Add Layer.”
  3. Add Vector Layer: From the “Add Layer” submenu, choose “Add Vector Layer.”
  4. Data Source Manager: A “Data Source Manager” window will pop up. In this window, select the “Directory” tab instead of the default “File” tab.
  5. Vector Dataset Type: In the “Directory” tab, choose “OpenFileGDB” or “Esri FileGDB” as the “Vector Dataset Type,” depending on the version of QGIS you are using.
  6. Browse Directory: Click on the “…” button (three dots) next to the “Directory” field to browse for the folder containing your gdb file.
  7. Select Folder: Navigate to the folder containing the gdb file, select it, and click “Open.”
  8. Add Layers: Click the “Add” button in the “Data Source Manager” window. A new window will appear, displaying the vector layers available in the gdb file.
  9. Choose Layers: Select the layers you want to add to your QGIS project. You can select multiple layers by holding down the “Control” key (or “Command” key on macOS) while clicking on the desired layers.
  10. Confirm Selection: Click “OK” to add the selected layers to your QGIS project.
  11. Close Window: Close the “Data Source Manager” window.

Now, the selected layers from the gdb file should appear in your QGIS project’s “Layers” panel, and you can start working with the data.

How to Open ESRI File (gdb) using GDAL (Geospatial Data Abstraction Library)

GDAL supports the File Geodatabase format through its OpenFileGDB driver, which allows read-only access to Esri File Geodatabase files (.gdb). To use GDAL to open a gdb file, follow these steps:

  1. Install GDAL: If you don’t have GDAL installed on your system, download and install it from the official website (https://gdal.org/download.html). Make sure to get the version that supports the OpenFileGDB driver.
  2. Open a command prompt or terminal window: Launch the command prompt (Windows) or terminal (macOS/Linux).
  3. Use ogrinfo: To list the layers available in the gdb file, use the ogrinfo command followed by the path to the gdb folder. For example:
ogrinfo path/to/your/geodatabase.gdb

Replace path/to/your/geodatabase.gdb with the actual path to your gdb file. This command will display information about the layers in the geodatabase.

  1. Access specific layers: To access a specific layer within the gdb, you can use the ogr2ogr command to convert the layer to another format, such as a shapefile, GeoJSON, or CSV. For example, to convert a layer named “example_layer” to a shapefile, use:
ogr2ogr -f "ESRI Shapefile" output_shapefile.shp path/to/your/geodatabase.gdb example_layer

Replace output_shapefile.shp with the desired name for the output shapefile, and path/to/your/geodatabase.gdb with the actual path to your gdb file. This command will convert the “example_layer” to a shapefile format.

Read and write access?

When opening a gdb (geodatabase) file in QGIS or GDAL, the level of support for read and write access varies.

  1. QGIS: QGIS supports read-only access to Esri File Geodatabase files through the OpenFileGDB driver, which is included in the GDAL library that comes with QGIS. This means you can open and visualize gdb files, but you cannot edit the data or save changes back to the gdb file directly within QGIS.
  2. GDAL: The OpenFileGDB driver included in GDAL provides read-only access to Esri File Geodatabase files. You can use GDAL to read and convert data from gdb files to other formats, but you cannot edit or write changes back to the gdb file using the OpenFileGDB driver.

However, GDAL also includes the FileGDB driver, which provides both read and write access to Esri File Geodatabase files. To use the FileGDB driver, you need to have the Esri File Geodatabase API library installed and GDAL compiled with support for this library. Keep in mind that the Esri File Geodatabase API is available for Windows and Linux only, and has certain licensing restrictions.

In summary, QGIS and GDAL’s OpenFileGDB driver provide read-only access to gdb files. If you need read and write access, you can use GDAL’s FileGDB driver with the Esri File Geodatabase API, but it comes with certain limitations and licensing restrictions.

About the Author
I'm Daniel O'Donohue, the voice and creator behind The MapScaping Podcast ( A podcast for the geospatial community ). With a professional background as a geospatial specialist, I've spent years harnessing the power of spatial to unravel the complexities of our world, one layer at a time.

Leave a Reply