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

Sandro Mani manisandro at gmail.com
Thu Jul 6 02:54:32 PDT 2017



On 06.07.2017 11:38, Martin Dobias wrote:
> Hi Sandro
>
> On Thu, Jul 6, 2017 at 11:00 AM, Sandro Mani <manisandro at gmail.com> wrote:
>> It would be something I would call explicitly while the geometry checker is
>> active, I think it is safe to assume that users don't expect that they can
>> operate on the shapefile while the geometry checker is processing it.  It
>> would not add much complexity to the provider, just a flag that repacking is
>> frozen, and a setter to set that flag. When the flag is set to false, the
>> shapefile is repacked.
> How about changing the logic in geometry checker? Instead of saving
> changes any time user chooses an action, one could just keep a buffer
> of changes and then commit everything at once when the user is done
> fixing things... That would be also more efficient and it seems like
> an easier solution than adding workarounds to data provider interface
> for one particular format.
As mentioned before, the problem is that if one of the changes to be 
committed is refused by the provider, you're stuck not being able to 
commit the entire set of changes. And, since we are dealing with invalid 
geometries, it is not that unlikely that this occurs. Committing 
directly to the provider ensures that we know immediately whether a 
change is valid or not.

Sandro


More information about the QGIS-Developer mailing list