A few years back I jumped in way over my head with QGIS/Postgis. I had moved a process out of one software and into my favorite two (QGIS/PostGIS) and little did I know the final output had to be a ESRI File Geodatabase. So what did I do? I shamed them into using a geopackage. It worked well for a few years and then with almost every release of new ESRI software there was some hiccup with the Geopackage and it was causing issues.
So back in 2022 GDAL gained (and as a result QGIS) the ability to read and write an ESRI File Geodatabase. So I could finally dump my postgis to an ESRI File Geodatabase without a lot of worry. The quick and dirty on how this happens is:
ogr2ogr -f "OpenFileGDB" NRGS.gdb PG:"host=host user=rjhale dbname=henryco password=nope" "tn911.esn"
Which is basically “create an ESRi File Geodatabase called NRGS.gdb and connect to Postgis and pull out the ESN layer and stick it in NRGS.gdb”. It works well except I was still having some hiccups with ESRI processing the FGDB. Some of my columns weren’t quite lining up with the standard – mainly it was my problem and not the software.
BUT…..there’s always a but…..GDAL can append data to an existing ESRi File Geodatabase. So I can shove data into an official State Blessed ESRI File Geodatabase using the following:
ogr2ogr -f OpenFileGDB -append c:\TCSTransport\upload\TCSTransport.gdb -nln "Addresses" PG:"host=host port=5432 user='rjhale' password='nope' dbname='henryco'" -sql "select id as objectid, geom, oirid, r_segid, a_segid, seg_side, gislink, structype, strucdesc, stnum_h, stnum_l, stnum, stnumsuf, building, floor, unit_type, unit_num, predir, pretype, name, type, sufdir, postmod, address, addr_esn, label, subname, vanity, zip, zip4, esn, city, county, state, lon, lat, x_sp, y_sp, z_val, gpsdate, addrauth, source, editor, geomod, geosrce, geodate, attmod, attsrce, attdate, status, delnotes from tn911.address_points"
Everything exports as it needs to export and loads into the ESRI Package. No Problems.
If I have a one-off project that needs to load data into a ESRI File Geodatabase? Open the ESRi file Geodatabase in QGIS and copy and paste your data into the ESRI FGDB. In this case the client has a file geodatabase that has to have all the domains/subtypes/datasets and other things saved in the FGDB. QGIS handles it and saves it and keeps all that stuff intact. I can probably load it with GDAL – but I’ve not gotten that far into that for this particular project.
The point? I blend in. I’m delivering what the client needs and still enjoying my preferred software stack.




