[GRASSLIST:10097] Re: trying to read in ArcView/.mdb file of NYC roads

Roger Bivand Roger.Bivand at nhh.no
Tue Jan 31 12:41:44 EST 2006


On Tue, 31 Jan 2006, William Kyngesburye wrote:

> MDB is used by the ArcGIS Personal Geodatabase.  GDAL/OGR 1.3.1 has  
> support for reading these (except that it doesn't read annotation).   
> It does this by using ODBC.  So you need an ODBC driver for the MDB  
> format (MS Access) as well as GDAL.  Those can be a bit difficult to  
> get ($$), as they normally work as a bridge so you also need a  
> running MS Access server on a Windows PC.  On Windows, there may be  
> ODBC drivers that can directly read the MDB file, but I have no idea  
> about various flavors of Linux.

Correct. GDAL/OGR 1.3.1 under Linux is not happy just saying for example:

$ ogrinfo SGID100_CountyBoundaries.mdb
ERROR 1: Unable to initialize ODBC connection to DSN for DRIVER=Microsoft 
Access Driver (*.mdb);DBQ=SGID100_CountyBoundaries.mdb,
[unixODBC][Driver Manager]Data source name not found, and no default 
driver specified

from http://agrc.its.state.ut.us/agrc_sgid/sgidlib/statewide_gdb.htm

but under Windows XP (and clearly with the correct driver, although I had
no idea it might be there) ogrinfo works and ogr2ogr makes usable output.

So the quicker solution is to convert Personal Geodatabase data to a 
better supported format on a Windows machine, and use those copies. 

Has anyone an ODBC solution with an example of how to set up ODBC for
*.mdb on Linux and/or Mac OSX?

> 
> I have tried an Access ODBC driver on Mac OS X that can directly read  
> the MDB.  As shareware, it only works on the first 3 records of a  
> database until payed, but it seems to work.
> 
> On Jan 31, 2006, at 6:24 AM, Markus Neteler wrote:
> 
> > U. George wrote:
> >
> >> from the website:
> >> http://www.nyc.gov/html/dcp/html/bytes/dwnlion.shtml
> >>
> >> i would like to view the roads in the bronx. I am not familiar with
> >> either grass, or arcview.
> >> I have built 'grass' from source.  But am unable to import the
> >> LION.mdb data file.
> >>
> >>
> >> GRASS 6.0.1 (GRASS):/tmp/lion > unzip -l nyc_lion05bav.zip
> >> Archive:  nyc_lion05bav.zip
> >>   Length     Date   Time    Name
> >>  --------    ----   ----    ----
> >>     15360  05-10-05 14:59   LION Streets.lyr
> >>     18432  05-10-05 14:52   LION.lyr
> >>     27640  05-02-05 13:53   NYC LION Geocoding (GDB).lot
> >>     27201  05-10-05 11:44   NYC LION Geocoding (SDE).lot
> >>    133436  08-02-05 10:11   nyc_lion_metadata.htm
> >>  48627712  08-02-05 10:08   Data/LION.mdb
> >>         0  07-11-05 12:21   Data/
> >>    109568  07-20-05 12:34   Geocoding with LION.doc
> >>  --------                   -------
> >>  48959349                   8 files
> >>
> > You may use:
> >
> >  http://mdbtools.sourceforge.net/
> >  " The MDB Tools project is a effort to document the MDB file format
> > used in Microsoft <http://www.microsoft.com/>'s Access database
> > <http://www.microsoft.com/office/access/default.asp> package, and to
> > provide a set of tools and applications to make that data available on
> > other platforms."
> >
> > Markus
> >
> 
> -----
> William Kyngesburye <kyngchaos at kyngchaos.com>
> http://www.kyngchaos.com/
> 
> Theory of the Universe
> 
> There is a theory which states that if ever anyone discovers exactly  
> what the universe is for and why it is here, it will instantly  
> disappear and be replaced by something even more bizarrely  
> inexplicable.  There is another theory which states that this has  
> already happened.
> 
> -Hitchhiker's Guide to the Galaxy 2nd season intro
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the grass-user mailing list