Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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