[GIS] How to import esri Personal Geodatabase (.mdb) to PostGIS on Linux

esri-geodatabasegeoprocessingopen-source-gispostgis

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=10.10.10.10 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.

Best Answer

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.