[Qgis-user] Once again mdb files on Linux.

Fernando M. Roxo da Motta petro at roxo.org
Fri Jun 19 07:40:04 PDT 2015



  Hi all,


  Has someone tried to load MDB file on QGIS in Linux lately?

  I went through this list history and read a lot about people trying
to load this kind of data in QGIS and failing.   So far the impression
I have is that it is only feasible using Windows 32 bits.   I don't
remember to read a single case of success in Linux.

  I am trying to follow the instructions from many messages, in many
lists, in many languages without success.

  I am running [Xu|U]buntu 14.04.2 LTS 64 bits, with QGIS 2.8.2 64 bits
from QGIS repository (using apt-get).  I have installed mdbtools,
odbc-mdbtools and unixodbc, everything with 64bits.

  I have the following configurations:

$ cat /etc/odbcinst.ini
[MDBTools]
Description             = MDBTools Driver
Driver          = libmdbodbc.so
Setup           = libmdbodbc.so
FileUsage               = 1
UsageCount              = 1

$ cat .odbc.ini 
[Limites]
Description = Something to test
Driver = MDBTools
Database = ~/gis/dados/Meus/MDB/Limites.mdb
Host        = 
Port        = 
User        = 
Password    =
Trace       = Yes
TraceFile   = /tmp/Limites.log

$ odbcinst -q -s
[Limites]

$ isql Limites
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> 

  If I try a number of queries it seems to work.


  If someone wnt to give it a try, the Limites.mdb file was obtained at:

ftp://geoftp.ibge.gov.br/mapeamento_sistematico/base_vetorial_continua_escala_250mil/Limites.zip

  Ogrinfo, _in_principle_, as support for ODBC and PGeo:

$ ogrinfo --formats|grep 'PGeo\|ODBC'
  -> "ODBC" (read/write)
  -> "PGeo" (readonly)


$ ogrinfo PGeo:Limites
ERROR 1: PGeo: MDB Tools driver not found!

Warning 1: Unable to install MDB driver for ODBC, MDB access may not
supported.

ERROR 1: PGeo: MDB Tools driver not found!

Warning 1: Unable to install MDB driver for ODBC, MDB access may not
supported.

FAILURE:
Unable to open datasource `PGeo:Limites' with the following drivers.
======= long list clipped ==========8<---------------

$ ogrinfo ODBC:Limites
geometry_columns is not a table in this database
Got no result for 'SELECT f_table_name, f_geometry_column,
geometry_type FROM geometry_columns' command INFO: Open of
`ODBC:Limites' using driver `ODBC' successful.

  In QGIS I tried to load using "insert vector layer->database" and
tried to configure two types of connections 'ESRI Personal GeoDatabase'
and 'ODBC'.   In both I configured just a name and a DSN from ODBC.
The test for Personal GeoDatabase failed but for ODBC succeeded.  But
when trying to load using ODBC connection it fail saying that
ODBC-Limites is not a recognized data source.

  One interesting thing (IMHO) is that if I insert the path for the MDB
file when trying the Personal GeoDatabase configuration the error in
QGIS reads:

Connection failed - Check settings and try again.

Extended error information:
Unable to initialize ODBC connection to DSN for
~/gis/dados/Meus/MDB/Limites.mdb, [unixODBC][Driver Manager]Data source
name not found, and no default driver specified

  If I use just the DSN of the '~/.odbc.ini' the error reads:

Connection failed - Check settings and try again.

Extended error information:


  After all this, is there anything else worth a try?


  TIA



  Roxo

-- 
---------------- Non luctari, ludare -------------------+ WYSIWYG
Fernando M. Roxo da Motta <petro at roxo.org>              | Editor?
Except where explicitly stated I speak on my own behalf.|  VI !!
      ( Usuário Linux registrado #39505 )               | I see text,
------------ Quis custodiet ipsos custodes?-------------+ I get text!
 



More information about the Qgis-user mailing list