[gdal-dev] OGR to Mysql problems

Pablo Carreira pablotcarreira at hotmail.com
Thu Mar 4 10:51:42 EST 2010

Hi Markus, after your email I have some new results:

1)With ogr2ogr:
SET GISBASE=C:\OSGeo4W\apps\grass\grass-6.4.0svn

ogr2ogr -f mysql MYSQL:geodados,user=root,password=rcamargo,host=localhost
-overwrite -lco spatial_index=no -nln areas

It worked very well!! I think the problem was with the GISBASE path (the \ / mixture and the "a").

2)With v.out.ogr:
v.out.ogr --verbose input=areas_recuperacao_trabalhado at geral 
type=area dsn=MYSQL:geodados,user=root,password=rcamargo,host=localhost 
format=MySQL olayer=teste3 -c lco=spatial_index=no

I still get the error: 
"ERROR 1: MySQL error message:Duplicate entry '1' for key 'OGR_FID'"
and only one row created at Mysql

My GRASS is the latest OSGeo4W version.


On Thu, Mar 4, 2010 at 1:27 PM, Pablo Carreira
<pablotcarreira at hotmail.com> wrote:
> Hi Even,
>  I don't know much of programming. I'am using the GRASS v.out.ogr tool to
> export from GRASS to Mysql.
> Do you think it's a GRASS bug?
Hi Pablo,
how old is your GRASS version?
> I had tryied ogr2ogr from command line in windows but I got this error:
> c:\>ogr2ogr -f mysql MYSQL:geodados,user=root,password=xxxxxx,host=localhost
> /grassdata/utmwgs23/geral/vector/areas_recuperacao_trabalhado/head
> -overwrite -lco spatial_index=no
> Warning 1: GRASS warning: Line♦ of ellipsoid table file
> <c:\osgeo4w\apps\grass\grass-6.a.0svn/etc/ellipse.table> is invalid
I observe that there is a mixture of \ and / mixed...  (also
grass-6.a.0svn is funny,
note the "a"?).
OSGeo4W-GRASS has been updated recently and should have all needed fixes
for the \ and / confusion. Perhaps it comes from the GRASS-GDAL plugin? I darkly
remember that it opens the ellipsoid table.
Navegue sem medo: O Internet Explorer 8 te deixa mais protegido. Baixe gratuitamente.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100304/2e9345d5/attachment-0001.html

More information about the gdal-dev mailing list