[QGIS-Developer] Vertex tool and cache invalidation

Hugo Mercier hugo.mercier at oslandia.com
Mon Jan 7 07:14:14 PST 2019


Hi Martin,

On 07/01/2019 10:22, Martin Dobias wrote:
> Hi Hugo
> 
> Are the issues you mentioned solved now by your PR
> https://github.com/qgis/QGIS/pull/8724 or that was some other separate
> issue?

Unfortunately, this only solves a very small part of the problem. The
overall issue of wrong cache synchronization is still there.

> 
> For your open question with "click first" behavior of vertex tool as
> an option - I don't know. There has been some interest to address some
> ergonomic issues in the new implementation, but I am not sure yet what
> we would end up doing...

I understand. I am still looking for a solution here.

So instead of resurrecting the old vertex tool, would it be possible to
make it work without index/cache ?
I understand a cache has been introduced to allow for edition when lots
of geometries are displayed on the current extent. But usually geometry
editions are made at a high level of details, when a few geometry
features are visible. Is a cache still needed if we somehow enforce the
edition to be allowed only at small scale ?

> 
> Cheers
> Martin
> 
> On Tue, Dec 18, 2018 at 9:30 AM Hugo Mercier <hugo.mercier at oslandia.com> wrote:
>>
>> Hi,
>>
>> I am facing some issues with the vertex tool of 3.x.
>>
>> In 2.18 the "node tool" was working by clicking first on a geometry to
>> select it or its vertices and then displace them. With the new "vertex
>> tool", there is no more first click involved and geometries are
>> "selected" when the mouse position is close enough.
>>
>> This behaviour and ergonomic change (which I like !) implied an
>> implementation that needs, for descent performances, to build a cache of
>> geometries and maintain it.
>>
>> Problems arise when a modification on a layer may trigger modifications
>> on others. For example when two layers have triggers in database (to
>> maintain a correct network topology in database for instance), or even
>> when the same layer is opened twice.
>>
>> QGIS has no way to know that the modification of a layer can modify
>> another layer. So it easily leads to problems where "phantom" geometries
>> are still selectable but actual (modified by side effect) geometries are
>> not.
>>
>> I introduced in a previous version a way to express "data dependencies"
>> between layers, with this issue in mind. For PostgreSQL databases, there
>> is probably also a way to circumvent this by using the LISTEN/NOTIFY
>> mechanism and some lines of Python.
>> However I find these solutions very obscure and unfriendly.
>>
>> Open question: what about re-introducing the old "click first" behaviour
>> of the vertex tool (and probably other tools) in a next version ? Not as
>> a replacement, but as a possible alternative.
>> _______________________________________________
>> 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
> 


More information about the QGIS-Developer mailing list