[gdal-dev] Connect to PostGIS with Python

Tod Haren ke7fxl at gmail.com
Sun Apr 20 15:50:41 EDT 2008


I've installed gdalwin32-1.5 and the PostGIS plugin, but can't connect
to a remote PostGIS database using python.  I've tried installing the
python bindings with the windows installer from the Python CheeseShop
and through easy_install.  I can open shapefiles with OGR and rasters
with GDAL just fine.  The PostgreSQL driver isn't getting registered
for Python.  I've checked that gdalwin32-1.5\bin is in my PATH and
gdalwin32-1.5\data is in GDAL_DATA.  What else could be missing?
Using ogrinfo opens the PostGIS database just fine, so my guess is
that there is something I've missed in the install for python.  Any
ideas?  Is there some documentation that I'm missing?  Google, etc
hasn't been much help.

Using a seperate install of FWTools 2.02 I can open the database with
Python using the same connection string.

Thanks,

Tod


More information about the gdal-dev mailing list