[QGIS-Developer] QGIS/OGR: FeatureIds reassigned on write to data provider?

Matthias Kuhn matthias at opengis.ch
Tue Jul 4 13:47:57 PDT 2017


On 7/4/17 6:46 PM, Even Rouault wrote:

> Another solution would be to defere the compaction only at layer
> closing (that's actually the new behaviour of the OGR Shapefile driver
> in recent GDAL versions to force a repack at closing). I'm not sure
> why QGIS currently repacks it every time ?
>

IIRC, in situations where the layer has not been closed and was still
used by other software at the same time, issues arose.

In particular features flagged as deleted by OGR (and no longer reported
as existing features by OGR) were still detected as existing features by
other applications. Often, this was surprising in situations when people
were working on shapefiles, deleted some features and then used this
file in a different application while it was still open in QGIS.

A common workflow that leads to this situation is when working on
shapefiles and then using them in a processing algorithm that involves
an external process. The processing situation could be avoided (detect
if potentially dangerous operations like a delete have been performed
since the last repack and if yes repack or write it to a new file), but
there were also other situations where people just have been working on
the same file in different GIS applications side-by-side.

From the lack of reported issues regarding this in the last two years
(compared to the time before) I suspect the current approach suits many
use-cases quite well. At the same time, I am very surprised that this is
the very first issue that I am aware of which is related to 7d7cdcd3.

Matthias

>  
>
> 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/20170704/7804a60e/attachment.html>


More information about the QGIS-Developer mailing list