[gdal-dev] ogr2ogr -preserve_fid does not work when dst_datasource is SQLite/SpatiaLite

Paul Li plite2012 at gmail.com
Sun Oct 25 10:05:16 PDT 2020


Using this option to convert shapefiles to shapefiles (with less columns)
works perfectly fine. However, when dst_datasource is SQLite/SpatiaLite,
this option is not working as expected, and ogc_fid is populated regardless.

When importing the same shapefiles directly into SpatiaLite
using ImportSHP(..., pk_column, ...), the pk_column from source is kept, no
additional fid column is created.

How do you explain the difference here?

Many thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20201025/454cf34f/attachment.html>


More information about the gdal-dev mailing list