[GIS] How tomport ESRI Geodatabase format .gdb into PostGIS

file-geodatabaseogr2ogrpostgistranslation

I ran into a problem when loading a ESRI Geodatabase format .gdb into PostGIS. I have data 2.5GB GDB file.
I followed some tutorials on the internet, but it seems that doesn't work out.

  1. I created a database "SampleNY"
  2. I executed this from the console:

    ogr2ogr -f "PostgreSQL" PG:"dbname=SampleNY user=postgres" NYPluto/Pluto.gdb

But nothing happens, I didn't got neither an error nor a successful operation.
Did I miss any steps?

Best Answer

Try adding appropriate host and port arguments.
And BTW, when I import a large GDB file, I also add these flags:

-overwrite (erases any mess you may have already inserted) and

-progress (displays a dot or number for every 10,000 or 10% records added):

--config PG_USE_COPY YES (greatly improves speed)

So the command (which should be a one-liner but i formatted here for clarity) becomes

ogr2ogr 
    -f "PostgreSQL" 
    PG:"host=localhost port=5432 dbname=SampleNY user=postgres" 
    NYPluto/Pluto.gdb 
    -overwrite -progress --config PG_USE_COPY YES

Use a URL in place of "localhost" if needed.