OGR2OGR – convert a multilayer gdb to seperate postgres tables

for tbl in $(ogrinfo geodatabase.gdb| cut -d “:” -f2 | cut -d “(” -f1); do ogr2ogr -f “PostgreSQL” PG:”host=localhost port=5432 dbname=osni_fusion user=username password=pwd”  geodatabase.gdb -nln data.$tbl $tbl; done

Leave a comment