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

Sandro Mani manisandro at gmail.com
Thu Jul 13 15:51:12 PDT 2017



On 14.07.2017 00:01, Martin Dobias wrote:
> Hi Sandro
>
> On Wed, Jul 12, 2017 at 11:15 AM, Sandro Mani <manisandro at gmail.com> wrote:
>> 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.
> Out of curiosity, which providers tend to refuse features? I thought
> that most providers will be happy to commit also invalid geometries
> given that they do not mind storing them. Are geometries refused only
> if they are invalid or are there also other related issues? Maybe it
> would help if we did not allow users to commit invalid geometries? (or
> only with big red warning that they should expect havoc, possibly end
> of the world)
A typical example are attribute collisions when columns are marked as 
unique (and some geometry checker methods fix errors by merging features 
geometries and combining attributes via some scheme, and combining 
attributes does not always end up well).
I can't remember if I also encountered cases where commits were refused 
because of the actual geometry being invalid.

That said, as mentioned elsewhere in the thread, having the edit mode 
inbetween causes headaches because the user can interfere by manually 
changing geometries and the plugin loses track of what's going on.

Sandro


More information about the QGIS-Developer mailing list