<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div apple-content-edited="true">I've tried the R solution w/o success, see below </div><br><div><div>On Aug 9, 2009, at 8:35 AM, Markus Neteler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Sun, Aug 9, 2009 at 3:23 AM, stephen sefick&lt;<a href="mailto:ssefick@gmail.com">ssefick@gmail.com</a>&gt; wrote:<br><blockquote type="cite">I have a GIS database that is in .mdb format (microsoft access). &nbsp;I<br></blockquote><blockquote type="cite">have found mdb tools through my debian package manager, but now I<br></blockquote><blockquote type="cite">don't know how to get the data out of the the database and into GRASS.<br></blockquote><blockquote type="cite">&nbsp;There are x and y coordinates and other things in the database. &nbsp;Is<br></blockquote><blockquote type="cite">there a tutorial on how to get the data into GRASS from this database?<br></blockquote><br>I see two ways:<br><br>1) via unixODBC<br>For Linux, you need "unixODBC" to be installed (your preferred distribution<br>most likely contains this package). As done, get also the MDB Tools,<br>compile it with unixodbc support enabled if not already done.<br>Then follow instructions at <a href="http://www.gdal.org/ogr/drv_pgeo.html">http://www.gdal.org/ogr/drv_pgeo.html</a><br><br>2) via R<br><br>R<br>install.packages('Hmisc', dependencies=TRUE)<br>library(Hmisc)<br># Read all tables in the Microsoft Access database blabla.mdb<br># &nbsp;&nbsp;perhaps better change to Locale in which the .mdb file was<br># &nbsp;&nbsp;generated to avoid that accented table column names are<br># &nbsp;&nbsp;getting lost.file first<br>d &lt;- mdb.get('/path/to/blabla.mdb')<br>contents(d)<br>for(z in 1:length(d)) print(attributes(d)$names[z])<br><br></div></blockquote><span class="Apple-style-span" style="font-family: monospace; ">d &lt;- mdb.get('/path/to/blabla.mdb')</span></div><div><font class="Apple-style-span" face="monospace">returns to me with&nbsp;</font></div><div><font class="Apple-style-span" face="monospace">sh: mdb-tables: command not found<br></font><blockquote type="cite"><div>There you are. Now write out to something else with the "foreign"<br>package:<br><br>install.packages('RSQLite', dependencies=TRUE)<br>library(RSQLite)<br>drv &lt;- dbDriver("SQLite")<br>con &lt;- dbConnect(drv, dbname = '/tmp/blabla.db')<br>dbWriteTable(con, "mynewtable", d)<br>dbDisconnect(con)<br><br>Now you can open '/tmp/blabla.db' &nbsp;with 'sqlite3' or<br>other software, e.g. GRASS (import with db.in.ogr).<br><br>Cheers<br>Markus<br>_______________________________________________<br>grass-user mailing list<br><a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/grass-user<br><br></div></blockquote></div><br></body></html>