[gdal-dev] GML, MySQL data sources and preserve_fid
Even Rouault
even.rouault at mines-paris.org
Sun Apr 6 13:54:02 EDT 2008
Attila,
You're not doing anything wrong. In fact, the problem is not with the mysql
driver, but with the GML one. The GML driver cannot currently read correctly
the FIDs written. This is a known bug : see
http://trac.osgeo.org/gdal/ticket/1017
Le Sunday 06 April 2008 18:49:36 Attila Csipa, vous avez écrit :
> I'm just experimenting with having some of my data in MySQL, but I'm
> getting strange results regarding the FID - losing it, that is. It might be
> just that I have overlooked something obvious, but google and the ogr wiki
> pages turned up nothing that caught my eye...
>
> If I dump my data to gml from mysql like this:
>
> ogr2ogr -preserve_fid -f GML test.gml MySQL:test,user=root
>
> the GML will have the correct FID-s, however, if I try to load back that
> same GML into mysql with:
>
> ogr2ogr -preserve_fid -f MySQL MySQL:test,user=root test.gml -overwrite
>
> the features in the tables will have a sequential OGR_FID starting with 1,
> regardless of what the GML contains in the fid attribute of the features.
> This messes things up a bit as one of the feature fields is actually a
> reference to the parent features' FID. I'm using GDAL 1.4.4 on Gutsy (sadly
> no official 1.5.x packages in backports for Ubuntu yet). Any ideas ?
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list