[gdal-dev] GML duplicated FID
Martin Landa
landa.martin at gmail.com
Thu Mar 4 13:23:23 PST 2021
Hi all,
I have an issue with GML generated by GeoServer. There are features
with duplicated FID:
```
OGRFeature(lucas_view):36
gml_id (String) = lucas_view.fid--269ff1b9_177af2abc34_-36e6
point_id (Integer) = 45502976
nuts0 (String) = CZ
POINT (4550000 2976000)
OGRFeature(lucas_view):36
gml_id (String) = lucas_view.fid--269ff1b9_177af2abc34_-36e5
point_id (Integer) = 45542918
nuts0 (String) = CZ
POINT (4554000 2918000)
```
This is a reason why converting such data into GPKG (using
CopyLayer()) fails with:
```
ERROR 1: failed to execute insert : UNIQUE constraint failed: layer.fid
```
Is there any way to force the GML driver to generate a unique FID
instead of guessing from gml_id?
Thanks in advance, Martin
--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
More information about the gdal-dev
mailing list