Opened 14 years ago

Last modified 8 years ago

#984 new defect

v.out.ogr to MySQL does not work propely

Reported by: pablotcarreira Owned by: grass-dev@…
Priority: normal Milestone: 6.4.6
Component: Vector Version: unspecified
Keywords: wingrass, v.out.ogr, mysql Cc:
CPU: x86-32 Platform: MSWindows XP

Description

With OSGeo4W version When try v.out.ogr some vectors to Mysql I got the following problem: ERROR 1: MySQL error message:Duplicate entry '1' for key 'OGR_FID'

For every vector it try to use the same OGR_FID and at the end It exports only the first vector becouse the other has duplicated FID.

the command is the following: v.out.ogr --verbose input=areas_vector@geral type=area dsn=MYSQL:geobase,user=root,password=xxxxx,host=localhost format=MySQL olayer=teste3 -c lco=spatial_index=no

I had sent a message to gdal-devel and here is the answer:

This could happen if you pass to CreateFeature() features that have the same id set by OGRFeature::SetFID() as being 1... Check with OGRFeature::GetFID() what you pass to CreateFeature(). Even

With ogr2ogr utilitie the GRASS->MySQL works fine.

Change History (3)

comment:1 by hellik, 13 years ago

Keywords: wingrass added

in reply to:  description comment:2 by hellik, 13 years ago

Replying to pablotcarreira:

With OSGeo4W version When try v.out.ogr some vectors to Mysql I got the following problem: ERROR 1: MySQL error message:Duplicate entry '1' for key 'OGR_FID'

For every vector it try to use the same OGR_FID and at the end It exports only the first vector becouse the other has duplicated FID.

the command is the following: v.out.ogr --verbose input=areas_vector@geral type=area dsn=MYSQL:geobase,user=root,password=xxxxx,host=localhost format=MySQL olayer=teste3 -c lco=spatial_index=no

I had sent a message to gdal-devel and here is the answer:

This could happen if you pass to CreateFeature() features that have the same id set by OGRFeature::SetFID() as being 1... Check with OGRFeature::GetFID() what you pass to CreateFeature(). Even

With ogr2ogr utilitie the GRASS->MySQL works fine.

closing the ticket?

comment:3 by neteler, 8 years ago

Milestone: 6.4.06.4.6
Note: See TracTickets for help on using tickets.