[gdal-dev] problem converting a FileGDB to PostGIS using ogr2ogr

Martin Feuchtwanger feumar at shaw.ca
Thu Nov 1 12:19:06 PDT 2012


Hello, i'm new to PostGIS and OSGeo. I have a problem converting a 
FileGDB to PostGIS using ogr2ogr.

First some background on what i've done:

Installed OpenGeo Suite Enterprise Edition 3.0 to c:\Program Files 
(x86)\OpenGeo\OpenGeo Suite\

Did the Introduction to PostGIS tutorial at 
http://workshops.opengeo.org/postgis-intro/

Downloaded OSGeo4W from http://trac.osgeo.org/osgeo4w

Installed via "Advanced install" (to also include) the "ogr2ogr" tool to 
c:\OSGeo4W\

Downloded test_fgdb.gdb.zip -- a test GDB file (created with ArcGIS ver 
10) by Michael Smith from 
http://12.189.158.78:8081/downloads/test_fgdb.gdb.zip
(http://lists.osgeo.org/pipermail/gdal-dev/2011-April/028391.html)

Unpacked the GDB file to c:\Users\Martin\Documents\test.gdb\

Now here's the problem:

Using OSGeo4W shell command
*    c:\OSGeo4W\bin\ogr2ogr -f "PostgreSQL" PG:"dbname=test 
user=postgres" c:\Users\Martin\Documents\test.gdb*
i got
     ERROR 1: PQconnectdb failed.
     could not connect to server: Connection refused (0x0000274D/10061)
             Is the server running on host "???" and accepting
             TCP/IP connections on port 5432?

     ERROR 1: PostgreSQL driver doesn't currently support database creation.
     Please create database with the `createdb' command.
     PostgreSQL driver failed to create PG:dbname=test user=postgres

I get the same error messages whether or not i've already created a test 
database via pgAdminIII.
What do i need to do?

I remember having to append a '1' to the port "5432" when using 
pgAdminIII but know very little of hosts, servers and ports.

I notice that psql.exe is in two places (and two v. different versions):
*    c:\Program Files (x86)\OpenGeo\OpenGeo Suite\**
**     pgsql\9.1\bin\psql.exe    419,328 31/05/2012**
*and
*    c:\OSGeo4W\bin\psql.exe    299,008    11/03/2010**
*Would that be an issue?

Any help would be very much appreciated -- even if only a pointer to a 
better place to ask the question.

-- 
Martin Feuchtwanger  feumar at shaw.ca  604-254-0361
Vancouver, BC  members.shaw.ca/geomatics.developer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121101/26cf5270/attachment.html>


More information about the gdal-dev mailing list