[GRASS-dev] [GRASS GIS] #984: v.out.ogr to MySQL does not work propely

#984: v.out.ogr to MySQL does not work propely
-----------------------------+----------------------------------------------
Reporter: pablotcarreira | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Vector | Version: unspecified
Keywords: v.out.ogr mysql | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------------+----------------------------------------------
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.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/984&gt;
GRASS GIS <http://grass.osgeo.org>

#984: v.out.ogr to MySQL does not work propely
----------------------------------------+-----------------------------------
Reporter: pablotcarreira | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Vector | Version: unspecified
Keywords: wingrass, v.out.ogr, mysql | Platform: MSWindows XP
      Cpu: x86-32 |
----------------------------------------+-----------------------------------
Changes (by hellik):

  * keywords: v.out.ogr mysql => wingrass, v.out.ogr, mysql

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/984#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#984: v.out.ogr to MySQL does not work propely
----------------------------------------+-----------------------------------
Reporter: pablotcarreira | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Vector | Version: unspecified
Keywords: wingrass, v.out.ogr, mysql | Platform: MSWindows XP
      Cpu: x86-32 |
----------------------------------------+-----------------------------------

Comment(by hellik):

Replying to [ticket:984 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?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/984#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>