We have esri Personal Geodatabases that we need to import into PostGIS.

Ultimately, we'd like to allow people to upload an MDB on a web server, and have it import the layers into PostGIS.

On Windows, with FW Tools, the following works fine:

ogr2ogr -f "PostgreSQL" PG:"host= user=someuser dbname=poi password=somepassword port=5432" S:\GISData\Test.mdb -a_srs EPSG:26986

However, I'd like to automate this, (and do it programatically) so [I think] it would be a LOT easier on Linux.

2 Answers 2


You should be able to get ogr to read Personal Geodatabases on linux. Here is an OGR help page describing how to do this: http://www.gdal.org/ogr/drv_pgeo.html

Essentially, you need to install unixODBC and MDB Tools in order to enable support.

Once you get OGR support for the Personal Geodatabase established, you could use a shell script to automate ogr2ogr or you could use OGR's Python/php/etc. modules to write a more custom script to migrate the data.


You could also write a Python script using OGR. There is an example of "pymod" for OGR here: http://svn.osgeo.org/gdal/branches/1.4/gdal/pymod/samples/assemblepoly.py

A pythonic solution can be run equally well on either Windows or Linux.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.