[GRASS-user] Geodatabase and GRASS GIS - how to get the data out of a geodatabase

stephen sefick ssefick at gmail.com
Sun Aug 9 22:27:09 EDT 2009


I am on mac OS X

There is an mdb-tools prerelease from fink that I have downloaded and
installed.  It seems to be working fine, but the mdb.get from Frank's
Hmisc is not working.  It says:

Can't alloc filename
Couldn't open database.

but I have used this and gotten a csv file

mdb-export /Users/sefick/Desktop/FtBragg_GeoDataBase_AuburnUNV.mdb
Timber_Sale_Areas > /Users/sefick/test.csv

Stephen

On Sun, Aug 9, 2009 at 12:55 PM, William
Kyngesburye<woklist at kyngchaos.com> wrote:
> Well, don't get your hopes up.  I had a little better success this time, but
> it seems to be ignoring blob fields, which is how the coordinate data is
> stored.  A commercial ODBC driver that looked promising a few years ago has
> a nasty bug getting blob data, and still hasn't been fixed (...time to bug
> the developers again).
>
> One possibility is to use a virtualized Linux to use GDAL+mdb-tools.
>  VirtualBox is free, though I'm using Parallels with no trouble.  Ubuntu
> runs great virtualized.
>
> On Aug 9, 2009, at 12:39 PM, Agustin Diez Castillo wrote:
>
>> You're right William, I'm on OSX and it seems that out of luck but in good
>> hands as long as you are trying to get mdb in mac.
>> I will keep an eye in any update about mdb-tools.
>> Agustin
>>
>>> Markus,
>>>
>>> I was trying to get mdbtools working on OSX this weekend (yet another
>>> attempt), and thought your R method might be an alternative.  But that
>>> also requires mdb-tools - that's where mdb-tables tool is found.
>>>
>>> Agustin: If I remember right, you're on OSX?  If so, you are out of
>>> luck, I have yet to find or compile a working MDB library for OSX.
>>>
>>> On Aug 9, 2009, at 9:45 AM, Agustin Diez Castillo wrote:
>>>
>>>> I've tried the R solution w/o success, see below
>>>>
>>>> On Aug 9, 2009, at 8:35 AM, Markus Neteler wrote:
>>>>
>>>>> On Sun, Aug 9, 2009 at 3:23 AM, stephen sefick<ssefick at gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> I have a GIS database that is in .mdb format (microsoft access).  I
>>>>>> have found mdb tools through my debian package manager, but now I
>>>>>> don't know how to get the data out of the the database and into
>>>>>> GRASS.
>>>>>> There are x and y coordinates and other things in the database.  Is
>>>>>> there a tutorial on how to get the data into GRASS from this
>>>>>> database?
>>>>>
>>>>> I see two ways:
>>>>>
>>>>> 1) via unixODBC
>>>>> For Linux, you need "unixODBC" to be installed (your preferred
>>>>> distribution
>>>>> most likely contains this package). As done, get also the MDB Tools,
>>>>> compile it with unixodbc support enabled if not already done.
>>>>> Then follow instructions at http://www.gdal.org/ogr/drv_pgeo.html
>>>>>
>>>>> 2) via R
>>>>>
>>>>> R
>>>>> install.packages('Hmisc', dependencies=TRUE)
>>>>> library(Hmisc)
>>>>> # Read all tables in the Microsoft Access database blabla.mdb
>>>>> #   perhaps better change to Locale in which the .mdb file was
>>>>> #   generated to avoid that accented table column names are
>>>>> #   getting lost.file first
>>>>> d <- mdb.get('/path/to/blabla.mdb')
>>>>> contents(d)
>>>>> for(z in 1:length(d)) print(attributes(d)$names[z])
>>>>>
>>>> d <- mdb.get('/path/to/blabla.mdb')
>>>> returns to me with
>>>> sh: mdb-tables: command not found
>>>
>>> -----
>>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>>> http://www.kyngchaos.com/
>>>
>>> "Mon Dieu! but they are all alike.  Cheating, murdering, lying,
>>> fighting, and all for things that the beasts of the jungle would not
>>> deign to possess - money to purchase the effeminate pleasures of
>>> weaklings.  And yet withal bound down by silly customs that make them
>>> slaves to their unhappy lot while firm in the belief that they be the
>>> lords of creation enjoying the only real pleasures of existence....
>>>
>>> - the wisdom of Tarzan
>>>
>>>
>>> _______________________________________________
>>> grass-user mailing list
>>> grass-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>
>>>
>>
>>
>> --
>> ******************************************************
>> Dr. Agustín Diez Castillo
>> Departament de Prehistòria i Arqueologia
>> Phone:   +34 963 86 42 42
>> Avda. Blasco Ibañez, 28   Fax:      +34 963 86 42 34
>> València 46010
>> ******************************************************
>>
>>
>>
>>
>
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> "Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting,
> and all for things that the beasts of the jungle would not deign to possess
> - money to purchase the effeminate pleasures of weaklings.  And yet withal
> bound down by silly customs that make them slaves to their unhappy lot while
> firm in the belief that they be the lords of creation enjoying the only real
> pleasures of existence....
>
> - the wisdom of Tarzan
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>



-- 
Stephen Sefick

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

								-K. Mullis


More information about the grass-user mailing list