[GIS] Migrating geodatabase data into PostGIS without Esri apps

esri-geodatabasepostgisspatial-etl

Can you tell me how I can load geodatabase data into PostGIS without having to install Esri apps?

The solution I found online talked about using ArcGIS to convert GDB to SHP and then importing SHP to PostGIS.

Best Answer

I do it all the time for my clients.

Dump your data to FileGDB or Shapefiles then execute the following command:

For ESRI Shapefiles:

ogr2ogr -f "PostgreSQL" PG:"dbname=mydbname user=postgres" myshapefile.shp

For FileGDB:

ogr2ogr -f "PostgreSQL" PG:"dbname=mydbname user=postgres" myFileGDB.gdb

For FileGDB, you need to make sure that the FileGDB driver is installed. You do it with:

ogrinfo --formats

which should show FileGDB somewhere to tell you it is installed.