[gdal-dev] Trouble connecting to PostGIS db
Jose Gomez-Dans
jgomezdans at gmail.com
Thu Oct 2 14:20:58 EDT 2008
Hi,
I have a remote PostGIS database on, say host. I can connect to it using
QGIS and display data (it actually comes up with "Database connection was
successful but no accessible tables were found. Please verify that you have
SELECT privilege on a table carrying POSTGIS geometry", but it displays all
my geo-enabled tables and uses data without any problem). shp2pgsql also
works, but I can't connect to said db using OGR.
$ ogrinfo --debug on -ro 'PG:host=HOST user=USER password=PASSWORD port=5432
dbname=DBNAME'
OGR_PG: DBName="DBNAME"
OGR_PG: PostSIS version string: '1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1' ->
'1.3'
OGR_PG: POSTGIS_VERSION=1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
OGR: OGROpen(PG:host=HOST user=USER password=PASSWORD port=5432
dbname=DBNAME) failed.
FAILURE:
Unable to open datasource `PG:host=HOST user=USER password=PASSWORD
port=5432 dbname=DBNAME' with the following drivers.
-> ESRI Shapefile
-> MapInfo File
-> UK .NTF
-> SDTS
-> TIGER
-> S57
-> DGN
-> VRT
-> REC
-> Memory
-> BNA
-> CSV
-> GML
-> GPX
-> KML
-> GeoJSON
-> Interlis 1
-> Interlis 2
-> GMT
-> SQLite
-> ODBC
-> PGeo
-> OGDI
-> PostgreSQL
-> MySQL
-> AVCBin
Exactly the same values I issue on my ogrinfo call (or osgeo.ogr.Open(
pg_connect ) using the Python wrappers) provide the QGIS connection that
works as expected. psql also connects fine. OGR/GDAL version is 1.5.1.
Does anyone have any clues on how to keep on debugging this? I am sort of
lost on how to continue investigating this!
Thanks!
Jose
--
Centre for Terrestrial Carbon Dynamics
Department of Geography, University College London
Gower Street, London WC1E 6BT, UK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20081002/51575f1e/attachment.html
More information about the gdal-dev
mailing list