Re: [QGIS-Developer] Drill-down (cascading) forms in QGIS Value Relation Widgets crowdfunding

2018-04-17 Thread Matthias Kuhn
Hi Alessandro,

Thanks a lot for these detailed insights!

On 04/17/2018 12:44 PM, Alessandro Pasotti wrote:
> Hi,
>
> I'll try to address all concerns in a single mail (what a challenge!)
>
> First I would like to say that everybody has access to a different set
> of "average/typical users" and I cannot claim any statistical
> relevance to the group of users I've been in touch with.
>
> But the user's feedback that I've got so far is that the
> Value-Relation widget (V-RW) is easier to use and to understand: its
> scope it's limited to how data are entered and viewed and does not
> depend on a model-project-level constraint (the Relation-Reference
> R-RW does).
>
> Those (statistically insignificant) users were quite emotional and
> ready to fight to keep V-RW live and healthy :)

May they be statistically significant or not, the opinion counts and is
important to be considered. I assume, the main requirement here is an
easy setup (i.e. directly in the widget, no roundtrip via project
properties). As long as this is not implemented, the value relation
widget will stay alive.

Let's focus on what other requirements are potential show-stoppers and
then decide if it's worth moving on.

> Code-wise I totally agree that the two widgets could share more logic
> and options, but given the intricacies of the attr-table and
> widgets-forms logic this is not trivial at all, and it's not in scope
> with this QEP 116 enhancement.
>
> Coming to the new functionalities introduced by QEP 116, the way they
> will be implemented will make them easily reusable in the context of
> the R-RW:
>
> - form scope context with geometry and attributes
> - form scope available in both the form and the attribute table

And that's what I really like about it!

>
> Of course existing bugs and glitches in the V-RW workflow will be
> fixed on the way when they not imply rewriting the whole QGIS core ;)
>
> What could be considered here, is to add a second goal to the campaign
> for making the new features available to the R-RW too, what do you think?

As written in my previous email, please do !!

>
> But even without this additional goal, I still think that this QEP
> (which is not a complete refactoring of the whole form/attr-table *-R
> widgets) is a step forward and in the direction of a future better
> integration of the existing *-R-widgets.
>
>
> That's why I'm joining Nyall's call to contribute and make this a reality.
>
>
> Also note that some of Règis requirements, like a geographical dynamic
> filter will be possible with an expression like:
>
> ... AND contains(buffer( $current_form_geometry, 10), $geometry)

... and even better with the R-R widget where it will be possible to
dynamically adjust the range from the form (thinking of advanced search
functionality in a popup or so), its new infrastructure allows for some
very cool additions which I hope to be able to implement soon ;)

Please keep up the good work and let us know what's required to bring
this to relation reference too!

Best regards
Matthias

> note that this expression is the one used to filter the values in the
> related layer, and it will have access to the geometry of the feature
> currently being edited/added in the form (or table row) as well as to
> the form (row) values, so:
>
> - $current_form_geometry = the geometry of the feature currently being
> edited in the form
> - $geometry = the geometry of the related layer that is being filtered
> to get the list of values for the combo/search/etc...
>
> Also note that the V-RW is already used in the identify results panel
> (and form of course).
>
>
> Cheers
>
> -- 
> Alessandro Pasotti
> w3:   www.itopen.it 
>
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

-- 
Matthias Kuhn
matth...@opengis.ch 
+41 (0)76 435 67 63 
OPENGIS.ch Logo 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Drill-down (cascading) forms in QGIS Value Relation Widgets crowdfunding

2018-04-17 Thread Alessandro Pasotti
Hi,

I'll try to address all concerns in a single mail (what a challenge!)

First I would like to say that everybody has access to a different set of
"average/typical users" and I cannot claim any statistical relevance to the
group of users I've been in touch with.

But the user's feedback that I've got so far is that the Value-Relation
widget (V-RW) is easier to use and to understand: its scope it's limited to
how data are entered and viewed and does not depend on a
model-project-level constraint (the Relation-Reference R-RW does).

Those (statistically insignificant) users were quite emotional and ready to
fight to keep V-RW live and healthy :)

Code-wise I totally agree that the two widgets could share more logic and
options, but given the intricacies of the attr-table and widgets-forms
logic this is not trivial at all, and it's not in scope with this QEP 116
enhancement.

Coming to the new functionalities introduced by QEP 116, the way they will
be implemented will make them easily reusable in the context of the R-RW:

- form scope context with geometry and attributes
- form scope available in both the form and the attribute table

Of course existing bugs and glitches in the V-RW workflow will be fixed on
the way when they not imply rewriting the whole QGIS core ;)


What could be considered here, is to add a second goal to the campaign for
making the new features available to the R-RW too, what do you think?

But even without this additional goal, I still think that this QEP (which
is not a complete refactoring of the whole form/attr-table *-R widgets) is
a step forward and in the direction of a future better integration of the
existing *-R-widgets.


That's why I'm joining Nyall's call to contribute and make this a reality.


Also note that some of Règis requirements, like a geographical dynamic
filter will be possible with an expression like:

... AND contains(buffer( $current_form_geometry, 10), $geometry)

note that this expression is the one used to filter the values in the
related layer, and it will have access to the geometry of the feature
currently being edited/added in the form (or table row) as well as to the
form (row) values, so:

- $current_form_geometry = the geometry of the feature currently being
edited in the form
- $geometry = the geometry of the related layer that is being filtered to
get the list of values for the combo/search/etc...

Also note that the V-RW is already used in the identify results panel (and
form of course).


Cheers

-- 
Alessandro Pasotti
w3:   www.itopen.it
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Drill-down (cascading) forms in QGIS Value Relation Widgets crowdfunding

2018-04-16 Thread Régis Haubourg
jHi all,

to go in the same direction as Andreas, my opinion is that the three
relational widgets (value relation, relation reference, and 0-n/n-m one)
need some love and I was about to start redacting a global QEP for that.

There are a lot of features missing and glitches we would like to adress,
and drill down between fields is one of them.

Merging and coordinating efforts would be great!

I'm off the office right nown, but here are the requirements I had,
according to our experience at building business applications with QGIS:


# widgets naming

A common issue is that the names are not very self explaining on what use
case they adress.
In training sessions, I use this simplification :

 - value relation widget are best used to affect value list (also named
sometimes domains) codes when displaying other values like clear or short
names
 - reference relation is the "Foreign key" chooser between real features
(some are choosable on a map, others not)
 - the relation widget is the opposite of the reference relation widget,
displaying the "n" part in 1-n relations

# common features needed for all widgets

 We need the same options in both value relation and relation reference
widgets.

- chained / unchained filters with consolidated tests (we have a lot of
regressions in ther behavior)

- a common "search tool" to find features to relate when it's not possible
to click on it, and when the list is long.
- A KNN search filter for spatial objects would be a massive win there to
efficiently limit the list. Alternatively filtering in extent, and by any
configurable expression would be nice

We prob

# Value relation specific issues

- This tool substitutes codes by value almost everywhere in QGIS. We
however miss the ability to display that value in some parts of the UI,
like layer symbology or identify result dialog. That is a real trick for
users and being able to display both real and translated values would solve
that

# relation reference speficic issue

- This tool load a sub form when not in " readonly" mode. This is quite
expensive and if we merge both widgets, we should pay attention to be as
lite as possible.

# Performance issues

We found in 2.18.15 that there were hard coded thresholds changing how
relation reference widget was requestion sub features when entering in edit
mode. This led to a sudden massive freeze when having more than 100 000
potential related features. SQL request suddenly fetched data by blocks of
2000 from 1 per 1 fetches using classical selects.
When raised the threshold and switched sub form preloading to readonly.
Matthias improved a lot of things recently, IIRC like multi threaded loading

Globally, this raise the issue that current situation might not scale up
for big databases and we need to put that requirement in the scope.



So, maybe this work could be helped by grant applications and customer
direct funding. Anyway, we need to coordinate there.

My two cents,



Régis




Le 16 avr. 2018 08:21, "Andreas Neumann"  a écrit :

Hi Nyall,

Interesting campaign and definitely some needed feature that will help
further improve forms in QGIS.

However, I wonder why you chose the "value relation widget" and not the
"relation reference widget". Both widget types have a larger overlap in
functionality and I did hope that we could get rid of one of the two
widgets in the future. Because from a user perspective it is confusing that
different widget types exist that do similar things.

I had the impression that the team around Denis/Matthias is pushing the
"relation reference widget" and had the plan to implement in the relation
reference widget everything the "value relation widget" does.

Matthias - please correct me if I am wrong.

Nyall/Matthias/Denis: What are your thoughts on the redundant functionality
in both widgets? Could we merge the two into one widget?

Greetings,
Andreas

On 2018-04-16 05:14, Nyall Dawson wrote:

Hi all,

North Road are proud to launch our latest QGIS crowd-funding campaign:
Drill-down (cascading) forms! This campaign covers extending the
functionality present in QGIS "Value Relation Widgets", allowing the
implementation of complex, dynamic filters within QGIS attribute
forms. The functionality can be used to implement "drill-down" forms
within QGIS, where the values available in one field depend on the
values of other fields.

Full details are available at the campaign page:
https://north-road.com/drill-down-cascading-forms/

We need your help to make this feature a reality! We need backers, but
just as importantly, we need people to spread the word about this
campaign so that all interested users and organisations hear about it.
Here are some ideas:

- spread the campaign page via your social media accounts: Twitter,
Linked in, etc
- forward a link to the campaign to any relevant professional networks
you're part of
- publicise the campaign via your local QGIS user group
- have a chat to your manager... if this feature will 

Re: [QGIS-Developer] Drill-down (cascading) forms in QGIS Value Relation Widgets crowdfunding

2018-04-16 Thread Matthias Kuhn
Hi,

Yes indeed, there is a large overlap between the two and it would be
nice to unite them in the future.

Most of the recent work has gone into the relation reference widget, but
unfortunately there are still some things that will need to be
implemented on the relation reference widget before the value relation
widget can be declared obsolete (and I did not yet make a comprehensive
list).

Nyall, what would be required to bring this functionality also (or only)
into the relation reference widget? I guess the work that has gone into
the preparation for this crowdfunding will make it a lot easier also to
implement this in the relation reference widget?

Best regards

Matthias


On 04/16/2018 08:21 AM, Andreas Neumann wrote:
>
> Hi Nyall,
>
> Interesting campaign and definitely some needed feature that will help
> further improve forms in QGIS.
>
> However, I wonder why you chose the "value relation widget" and not
> the "relation reference widget". Both widget types have a larger
> overlap in functionality and I did hope that we could get rid of one
> of the two widgets in the future. Because from a user perspective it
> is confusing that different widget types exist that do similar things.
>
> I had the impression that the team around Denis/Matthias is pushing
> the "relation reference widget" and had the plan to implement in the
> relation reference widget everything the "value relation widget" does.
>
> Matthias - please correct me if I am wrong.
>
> Nyall/Matthias/Denis: What are your thoughts on the redundant
> functionality in both widgets? Could we merge the two into one widget?
>
> Greetings,
> Andreas
>
> On 2018-04-16 05:14, Nyall Dawson wrote:
>
>> Hi all,
>>
>> North Road are proud to launch our latest QGIS crowd-funding campaign:
>> Drill-down (cascading) forms! This campaign covers extending the
>> functionality present in QGIS "Value Relation Widgets", allowing the
>> implementation of complex, dynamic filters within QGIS attribute
>> forms. The functionality can be used to implement "drill-down" forms
>> within QGIS, where the values available in one field depend on the
>> values of other fields.
>>
>> Full details are available at the campaign page:
>> https://north-road.com/drill-down-cascading-forms/
>>
>> We need your help to make this feature a reality! We need backers, but
>> just as importantly, we need people to spread the word about this
>> campaign so that all interested users and organisations hear about it.
>> Here are some ideas:
>>
>> - spread the campaign page via your social media accounts: Twitter,
>> Linked in, etc
>> - forward a link to the campaign to any relevant professional networks
>> you're part of
>> - publicise the campaign via your local QGIS user group
>> - have a chat to your manager... if this feature will make your work
>> easier, and you've saved money by implementing QGIS within your
>> organisation, consider contributing and let us make your job easier!
>>
>> Stay tuned for more updates and posts exploring this feature as the
>> campaign progresses...
>>
>> Nyall
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org 
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

-- 
Matthias Kuhn
matth...@opengis.ch 
+41 (0)76 435 67 63 
OPENGIS.ch Logo 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Drill-down (cascading) forms in QGIS Value Relation Widgets crowdfunding

2018-04-16 Thread Andreas Neumann
Hi Nyall, 

Interesting campaign and definitely some needed feature that will help
further improve forms in QGIS. 

However, I wonder why you chose the "value relation widget" and not the
"relation reference widget". Both widget types have a larger overlap in
functionality and I did hope that we could get rid of one of the two
widgets in the future. Because from a user perspective it is confusing
that different widget types exist that do similar things. 

I had the impression that the team around Denis/Matthias is pushing the
"relation reference widget" and had the plan to implement in the
relation reference widget everything the "value relation widget" does. 

Matthias - please correct me if I am wrong. 

Nyall/Matthias/Denis: What are your thoughts on the redundant
functionality in both widgets? Could we merge the two into one widget? 

Greetings,
Andreas 

On 2018-04-16 05:14, Nyall Dawson wrote:

> Hi all,
> 
> North Road are proud to launch our latest QGIS crowd-funding campaign:
> Drill-down (cascading) forms! This campaign covers extending the
> functionality present in QGIS "Value Relation Widgets", allowing the
> implementation of complex, dynamic filters within QGIS attribute
> forms. The functionality can be used to implement "drill-down" forms
> within QGIS, where the values available in one field depend on the
> values of other fields.
> 
> Full details are available at the campaign page:
> https://north-road.com/drill-down-cascading-forms/
> 
> We need your help to make this feature a reality! We need backers, but
> just as importantly, we need people to spread the word about this
> campaign so that all interested users and organisations hear about it.
> Here are some ideas:
> 
> - spread the campaign page via your social media accounts: Twitter,
> Linked in, etc
> - forward a link to the campaign to any relevant professional networks
> you're part of
> - publicise the campaign via your local QGIS user group
> - have a chat to your manager... if this feature will make your work
> easier, and you've saved money by implementing QGIS within your
> organisation, consider contributing and let us make your job easier!
> 
> Stay tuned for more updates and posts exploring this feature as the
> campaign progresses...
> 
> Nyall
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer