[GRASS-windows] is it possible to use R package spgrass6 to" load" MySQL data into Grass 6.3?

darren norris doon75 at hotmail.com
Tue Jul 22 12:34:59 EDT 2008


Dear Moritz and Markus,
Many thanks for taking the time to reply.
Markus - I will send the message to the grass-stats forum as suggested to
see if any one has implemented with R.....

Moritz:
I was attempting to get the data (defining vectors) from MySQL into GRASS
via v.in.db (accessed with windows menu via: vector > generate points >
generate points from database) which has a drop down list of driver names.
MySQL is not on the list. This was the driver I was referring to
(http://grass.osgeo.org/wiki/WinGRASS_Current_Status#ToDo ). I had no idea
about v.in.ogr!!

MySQL does not seem to be part of OGR at the moment. From
http://www.gdal.org/ogr/ogr_formats.html

MySQL: code = no, creaton = no, compiled = no needs MySQL library.

Which means I am now stuck, I followed the link (which I thought would take
me to the MySQL lirary) on the OGR site and it just went to the MySQL
developer site. 

Any suggestions about where the MySQL library is to go with OGR? 

Also is there any guide available for compiling OGR with MySQL in GRASS 6.3
under windows? I'm assuming I would have to build GRASS from source to do
this? Marco Pasetti said would there was currently none:  "Actually, there
are no specific instruction on how to compile GRASS with the MySQL support;
but if you want know how to build GRASS from source (just to realize the
"weight" of the job) take a look here: 
http://www.webalice.it/marco.pasetti/grass/BuildFromSource.html"

Also how likely am I to break things if I start to try to compile OGR
library with MySQL (I'm very new to this so I think it is pretty likely -
particularly as I don't understand yet how GRASS works with the libraries).
I'm also assuming this would take a complete novice (me) a few days at least
to test and get implemented properly -  does that seem about right? 

Again thanks for the guidance, hope I have not mixed terms around / confused
things too much (simply a reflection of my ignorance)...
Darren
-----Original Message-----
From: Moritz Lennert [mailto:mlennert at club.worldonline.be] 
Sent: 20 July 2008 16:37
To: Darren Norris
Cc: grass-windows at lists.osgeo.org
Subject: Re: [GRASS-windows] is it possible to use R package spgrass6 to"
load" MySQL data into Grass 6.3?

On 17/07/08 16:46, Darren Norris wrote:
> apologies for sending twice but first time had wrong subject line!!
>  
> Dear all,
> I need to get data (which define vector polygons, lines and points) from 
> MySQL database into GRASS (my rasters are in GRASS). As the MySQL driver 
> is being worked on (but low priotity) I'm just looking for alternatives 
> and advice.

Your R path seems like it should work, but if GDAL/OGR is compiled with 
MySQL support then v.in.ogr should work.

Don't know which MySQL driver you are speaking about: the GRASS database 
backend driver (which is irrelevant for importing spatial data from 
MySQL) or the GDAL/OGR driver ?

Moritz



More information about the grass-windows mailing list