[QGIS-Developer] set and export FID with OGR provider

G. Allegri giohappy at gmail.com
Tue Oct 10 03:12:54 PDT 2017


Ok, i will open a ticket to suggest the creation of a flag inside the Save
file window.
thanks Even.

giovanni

2017-10-10 12:08 GMT+02:00 Even Rouault <even.rouault at spatialys.com>:

> On mardi 10 octobre 2017 12:02:00 CEST G. Allegri wrote:
>
> > Hi Even,
>
> > I thought file writing path went through the OGR provider, while it
> simply
>
> > uses QgsFileWriter.
>
> > Is there any reason not having OGR_F_SetFID be used? If there isn't any
>
> > side effect could we use it by default?
>
>
>
> Apparently
>
> https://github.com/qgis/QGIS/commit/891e66523fdf21283ca15533684a57
> dd8c27f955
>
> was done to avoid issues with DXF output (AFAIR, some ids are reserved by
> the DXF template used, and if you use them for features you write, readers
> will be confused).
>
>
>
> But besides this bug, for drivers that support assigning a FID on
> creation, this will change their output. And I can imagine there are
> situations where you want a "clean" sequence of ids, and others where you
> really need to preserve the source fids. So it would make sense to have an
> option to control whether you set or not the FID before creation.
>
>
>
> Even
>
>
>
> --
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171010/5472fdf9/attachment-0001.html>


More information about the QGIS-Developer mailing list