[QGIS-Developer] QGIS/OGR: FeatureIds reassigned on write to data provider?
Nathan Woodrow
madmanwoo at gmail.com
Tue Jul 4 16:10:56 PDT 2017
>
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.
This raises the question. Should we support that? A lot of file types are
just not meant to be opened by many applications at the same, e.g MapInfo
wants a full exclusive read/write lock on tab files. My gut has always
been if it's file based you shouldn't be using it in other applications at
the same time.
- Nathan
On Wed, Jul 5, 2017 at 6:47 AM, Matthias Kuhn <matthias at opengis.ch> wrote:
> 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
>
>
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170705/c6155178/attachment.html>
More information about the QGIS-Developer
mailing list