File geodatabase is a collection of files in a folder to store and manage both spatial and nonspatial data. File geodatabase originally came from ESRI ArcGIS and the QGIS has the capability to open and read file geodatabase from default installation using OpenFileGDB driver. However, in order for QGIS to be able to edit and write file geodatabase, a separate GDAL driver (FileGDB) has to be installed separately after QGIS installation through OSGeo4W.
- Close QGIS software on your computer and go to Start Menu → Programs → OSGeo4W and Click Setup and choose Advanced Install (Figure 1).
- When prompted, choose Install from Internet and Direct Connection. Select download.osgeo.org as your download site.
- Click “+” to expand Libs in Figure 2. After expansion, go to gdal-filegdb: OGR FileGDB Driver under the last column of “Package”.
- For gdal-filegdb: OGR FileGDB Driver, keep clicking the “New” column area and the value will rotate between Keep, Reinstall, new and/or old version number of FileGDB drive. In Figure 3 the newest version 3.1.4-3 is chosen and click Next to install FileGDB Driver for the first time.
- After FileGDB Driver is installed successfully, to open a file geodatabase with the intent to edit and write it in QGIS, open Data Source Manager – Vector (Figure 4), select Source Type as Directory, and the Drive Type as ESRI FileGDB and select the file geodatabase you want to open (Figure 5), click Add to bring the file geodatabase into QGIS.
- At Step 5, if you simply want to read the file geodatabase in QGIS, choose the Driver Type as OpenfileGDB (Figure 6) instead of ESRI FileGDB.
- After a file geodatabase is brought into QGIS, regardless of which driver is used, you can always convert it to a shapefile (or other formats) by right clicking the file, then select Export → Save Features As … (Figure 7).