[gdal-dev] Trying to get ogr2ogr (and ogrinfo) to work with an ESRI Personal Geodatabase (.mdb) on Linux.

Mike Hapner mikehapner at yahoo.com
Thu Aug 27 15:43:01 EDT 2009


Short version:
Trying to get ogr2ogr (and ogrinfo) to work with an ESRI Personal Geodatabase (.mdb) on Linux.

-----------------------------------------------------------------------------------------------------------------------------------------

I've
done quite a bit of research and am pulling my hair out, so I'd love it
if someone can point out the one or more thing(s) that I'm doing wrong.

I've mainly been trying to get the scenario on this page to work:  http://gdal.org/ogr/drv_pgeo.html

I'm
trying to push an ESRI Personal Geodatabase called geonames.mdb into a
Postgres/PostGIS database.  I can do this fine with ogr2ogr on
windows...but cannot for the life of me get it to work on Linux.  (For
example -- in windows... ogr2ogr -f "PostgreSQL"
PG:"host=192.168.23.23 user=someuser dbname=poi password=somepassword
port=5432" S:\GISData\Geonames.mdb -a_srs EPSG:26986 works great)

My environment:
- Linux 2.6.28-14-server - Ubuntu 9.04(64bit)
- Postgres/PostGIS
- Installed the following packages with apt-get

        unixodbc libmdbodbc gdal-bin mdbtools
-- Note:  I installed gdal-bin to get the ogr utilities because I couldn't get FWTools installer to work.... 


/etc/odbcinst.ini --- Note that the file in the driver line exists... and has read permissions
  [Microsoft Access Driver (*.mdb)]
  Description = MDB Tools ODBC drivers
  Driver     = /usr/lib/libmdbodbc.so.0                           
  Setup      =
  FileUsage  = 1
  CPTimeout  =
  CPReuse    =



~/.odbc.ini 
[geonames]
Description = Sample PGeo Database
Driver      = Microsoft Access Driver (*.mdb)
Database    = /mnt/data/gis/testgis/geonames.mdb
Host        = 
Port        = 
User        =
Password    =
Trace       = Yes
TraceFile   = /mnt/data/gis/testgis/odbc.log



Things that work correctly:
$mdb-tables -1 geonames.mdb    #  proves to me that mdbtools is properly installed and can see the tables inside the mdb file
GDB_ReleaseInfo
GDB_FeatureDataset
GDB_ObjectClasses
...
...
...

$ogrinfo
abc123.shp       # proves to me that ogrinfo (from gdal-bin) is
installed and can at least open a SHP file I had laying around
INFO: Open of `abc123.shp'
      using driver `ESRI Shapefile' successful.
1: abc123 (3D Point)

$ogr2ogr -f "KML" abc123.kml abc123.shp  # This creates kml of the shp file... perfect.


The problem is when I try to get it to open the geonames connection...
--------------------------------------------------------------------------------------------------------------
$ ogrinfo PGeo:geonames
ERROR 1: PGeo: MDB Tools driver not found!

ERROR 1: Unable to install MDB driver for ODBC!

ERROR 1: PGeo: MDB Tools driver not found!

ERROR 1: Unable to install MDB driver for ODBC!

FAILURE:
Unable to open datasource `PGeo:geonames' with the following drivers.

---------------------------------------------------------------------------------------------------------------
$ ogr2ogr -f "KML" abc123.kml PGeo:geonames.mdb
ERROR 1: PGeo: MDB Tools driver not found!

ERROR 1: Unable to install MDB driver for ODBC!


I know this is kinda long, but I didn't want to get yelled at for not doing my homework and not giving enough info... Looking forward to hearing back!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090827/b6bdadea/attachment.html


More information about the gdal-dev mailing list