Re: [QGIS-Developer] Cleaning up the QGIS Developers/QGIS Community groups

2021-11-22 Thread Nyall Dawson
On Mon, 22 Nov 2021 at 19:29, Alessandro Pasotti  wrote:
>
>
> On Mon, Nov 22, 2021 at 12:41 AM Nyall Dawson  wrote:
>>
>> On Sun, 21 Nov 2021 at 18:22, Alessandro Pasotti  wrote:
>> >
>> > Yes please, thanks!
>>
>> Sorry -- turns out I don't have access to modify the QGIS member
>> groups. Want me to just collate a list of changes instead?
>>
>> Nyall
>
>
> Hi Nyall,
>
> you should have enough permissions now, but I'm happy to help if you need.

All done -- thanks!

Nyall

>
> Kind regards.
>
> --
> Alessandro Pasotti
> QCooperative:  www.qcooperative.net
> ItOpen:   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] Unabbreviated expression evaluation preview?

2021-11-22 Thread WhereGroup
Nice, I actually had the same thought of a "copy" icon because a text 
area would look super messy. I'll make two feature request for this 
later: 1) Copy to clipboard and 2) "Show full value" or something to 
open a dialog with the whole mess


Cheers
Hannes

Am 22.11.21 um 15:14 schrieb Andreas Neumann:

Agreed - I also like the "Copy to Clipboard" idea.

Andreas

On Mon, 22 Nov 2021 at 14:45, Matthias Kuhn > wrote:


Hi Hannes,

Good request.
I think it's mainly the way it is for not cluttering the - already
heavy - interface too much. And potential performance problems if
someone tries to put the complete qgis source code into the
preview (... that might lead to other problems too ...)

I'd propose an on-demand popup and integrate a "copy to clipboard"
action at the same time.

That would justify a feature request on github.

Cheers
Matthias

On Mon, Nov 22, 2021 at 2:26 PM Johannes Kröger (WhereGroup)
mailto:johannes.kroe...@wheregroup.com>> wrote:

Hi list,

when developing QGIS expression the preview string output of the
evaluation at the bottom of the dialog (e. g. Field
Calculator) is super
helpful. But it gets cut off after ~60 characters so for
longer returns
you cannot see them fully.

Is there an important reason for that cutoff or would it
theoretically
be possible to display the whole return value (e. g. in a
scrollable
area if needed)? Maybe that would require a safety limit at a
couple of
thousand characters but it would allow for more insight.

Cheers
Hannes

-- 
Johannes Kröger / GIS-Entwickler/-Berater

WhereGroup GmbH
Eifelstraße 7
53119 Bonn
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@wheregroup.com

www.wheregroup.com 
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
---


Where2B Konferenz 2021
16. Dezember 2021
im Universitätsclub Bonn und online
https://where2b-conference.com/ 


___
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




--

--
Andreas Neumann
QGIS.ORG  board member (treasurer)


--
Johannes Kröger / GIS-Entwickler/-Berater
WhereGroup GmbH
Eifelstraße 7
53119 Bonn
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
---


Where2B Konferenz 2021
16. Dezember 2021
im Universitätsclub Bonn und online
https://where2b-conference.com/




OpenPGP_0xBF7B268A77C202D5.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature
___
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] Purpose and function of "referenced_columns" in Python expression functions?

2021-11-22 Thread WhereGroup

Hi Matthias,

ah, that makes a lot of sense. So this can be used as a hint for 
optimisation of the ~"bandwidth" of the function so to speak. What a 
cool feature! My dataset was a tiny local geopackage so no surprise it 
just gave me access to all columns straight-away.


When I find time to make a PR I'll add a clearer sentence to the 
documentation and to change the new function template to either remove 
the parameter (so it uses the default) or make it use 
QgsFeatureRequest.ALL_ATTRIBUTES explicitely as hint that one could 
optimize that. (I prefer to remove it, it's optional with a sensible 
default...)


Cheers
Hannes

Am 22.11.21 um 14:48 schrieb Matthias Kuhn:

Hi Hannes,

This information can be used by the expression engine to determine 
what needs to be requested from the provider.
This can lead to significant performance improvements, depending on 
the scenario.


Depending on other functions used in the expression and the 
capabilities of the provider itself, the request may or may not 
include them.


As stated in the help, it's what the function *requires*, these 
attributes are guaranteed to be available. Others may still be there.


Cheers
Matthias


On Mon, Nov 22, 2021 at 2:41 PM Johannes Kröger (WhereGroup) 
> wrote:


Hi list,


https://docs.qgis.org/3.22/en/docs/user_manual/expressions/expression.html#function-editor



mentions the optional keyword argument "referenced_columns" to the
`@qgsfunction` decorator. It says

 > referenced_columns=[list]: An array of attribute names that are
required to the function. Defaults to
 > [QgsFeatureRequest.ALL_ATTRIBUTES].

That, and examples where it is used in other people's code, led me to
believe that the feature's attributes would not be accessible unless
listed in that parameter or if the parameter was omitted (-> default
value getting used -> default is all attributes).

The default code that gets inserted into the editor includes the
decorator `@qgsfunction(args='auto', group='Custom',
referenced_columns=[])` so I'd assume that I would not be able to use
any attributes in the function.

In reality I can access them just fine though, e. g.
`feature["name"]`
if I had features with a "name" attribute and that default
`referenced_columns=[]`.

I can even do so if I used `referenced_columns=["foo", "bar"]`!
`feature["name"]` is still perfectly accessible.

Is this a bug or by design? If by design, what purpose does this
parameter have?

Thanks
Hannes

-- 
Johannes Kröger / GIS-Entwickler/-Berater

WhereGroup GmbH
Eifelstraße 7
53119 Bonn
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@wheregroup.com

www.wheregroup.com 
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
---


Where2B Konferenz 2021
16. Dezember 2021
im Universitätsclub Bonn und online
https://where2b-conference.com/ 


___
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



--
Johannes Kröger / GIS-Entwickler/-Berater
WhereGroup GmbH
Eifelstraße 7
53119 Bonn
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
---


Where2B Konferenz 2021
16. Dezember 2021
im Universitätsclub Bonn und online
https://where2b-conference.com/




OpenPGP_0xBF7B268A77C202D5.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature
___
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] Unabbreviated expression evaluation preview?

2021-11-22 Thread Andreas Neumann
Agreed - I also like the "Copy to Clipboard" idea.

Andreas

On Mon, 22 Nov 2021 at 14:45, Matthias Kuhn  wrote:

> Hi Hannes,
>
> Good request.
> I think it's mainly the way it is for not cluttering the - already heavy -
> interface too much. And potential performance problems if someone tries to
> put the complete qgis source code into the preview (... that might lead to
> other problems too ...)
>
> I'd propose an on-demand popup and integrate a "copy to clipboard" action
> at the same time.
>
> That would justify a feature request on github.
>
> Cheers
> Matthias
>
> On Mon, Nov 22, 2021 at 2:26 PM Johannes Kröger (WhereGroup) <
> johannes.kroe...@wheregroup.com> wrote:
>
>> Hi list,
>>
>> when developing QGIS expression the preview string output of the
>> evaluation at the bottom of the dialog (e. g. Field Calculator) is super
>> helpful. But it gets cut off after ~60 characters so for longer returns
>> you cannot see them fully.
>>
>> Is there an important reason for that cutoff or would it theoretically
>> be possible to display the whole return value (e. g. in a scrollable
>> area if needed)? Maybe that would require a safety limit at a couple of
>> thousand characters but it would allow for more insight.
>>
>> Cheers
>> Hannes
>>
>> --
>> Johannes Kröger / GIS-Entwickler/-Berater
>> WhereGroup GmbH
>> Eifelstraße 7
>> 53119 Bonn
>> Germany
>>
>> Tel: +49 (0)228 / 90 90 38 - 36
>> Fax: +49 (0)228 / 90 90 38 - 11
>>
>> johannes.kroe...@wheregroup.com
>> www.wheregroup.com
>> Geschäftsführer:
>> Olaf Knopp, Peter Stamm
>> Amtsgericht Bonn, HRB 9885
>> ---
>>
>> 
>> Where2B Konferenz 2021
>> 16. Dezember 2021
>> im Universitätsclub Bonn und online
>> https://where2b-conference.com/
>> 
>>
>> ___
>> 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
>


-- 

--
Andreas Neumann
QGIS.ORG board member (treasurer)
___
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] Purpose and function of "referenced_columns" in Python expression functions?

2021-11-22 Thread Matthias Kuhn
Hi Hannes,

This information can be used by the expression engine to determine what
needs to be requested from the provider.
This can lead to significant performance improvements, depending on the
scenario.

Depending on other functions used in the expression and the capabilities of
the provider itself, the request may or may not include them.

As stated in the help, it's what the function *requires*, these attributes
are guaranteed to be available. Others may still be there.

Cheers
Matthias


On Mon, Nov 22, 2021 at 2:41 PM Johannes Kröger (WhereGroup) <
johannes.kroe...@wheregroup.com> wrote:

> Hi list,
>
>
> https://docs.qgis.org/3.22/en/docs/user_manual/expressions/expression.html#function-editor
> mentions the optional keyword argument "referenced_columns" to the
> `@qgsfunction` decorator. It says
>
>  > referenced_columns=[list]: An array of attribute names that are
> required to the function. Defaults to
>  > [QgsFeatureRequest.ALL_ATTRIBUTES].
>
> That, and examples where it is used in other people's code, led me to
> believe that the feature's attributes would not be accessible unless
> listed in that parameter or if the parameter was omitted (-> default
> value getting used -> default is all attributes).
>
> The default code that gets inserted into the editor includes the
> decorator `@qgsfunction(args='auto', group='Custom',
> referenced_columns=[])` so I'd assume that I would not be able to use
> any attributes in the function.
>
> In reality I can access them just fine though, e. g. `feature["name"]`
> if I had features with a "name" attribute and that default
> `referenced_columns=[]`.
>
> I can even do so if I used `referenced_columns=["foo", "bar"]`!
> `feature["name"]` is still perfectly accessible.
>
> Is this a bug or by design? If by design, what purpose does this
> parameter have?
>
> Thanks
> Hannes
>
> --
> Johannes Kröger / GIS-Entwickler/-Berater
> WhereGroup GmbH
> Eifelstraße 7
> 53119 Bonn
> Germany
>
> Tel: +49 (0)228 / 90 90 38 - 36
> Fax: +49 (0)228 / 90 90 38 - 11
>
> johannes.kroe...@wheregroup.com
> www.wheregroup.com
> Geschäftsführer:
> Olaf Knopp, Peter Stamm
> Amtsgericht Bonn, HRB 9885
> ---
>
> 
> Where2B Konferenz 2021
> 16. Dezember 2021
> im Universitätsclub Bonn und online
> https://where2b-conference.com/
> 
>
> ___
> 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


Re: [QGIS-Developer] Unabbreviated expression evaluation preview?

2021-11-22 Thread Matthias Kuhn
Hi Hannes,

Good request.
I think it's mainly the way it is for not cluttering the - already heavy -
interface too much. And potential performance problems if someone tries to
put the complete qgis source code into the preview (... that might lead to
other problems too ...)

I'd propose an on-demand popup and integrate a "copy to clipboard" action
at the same time.

That would justify a feature request on github.

Cheers
Matthias

On Mon, Nov 22, 2021 at 2:26 PM Johannes Kröger (WhereGroup) <
johannes.kroe...@wheregroup.com> wrote:

> Hi list,
>
> when developing QGIS expression the preview string output of the
> evaluation at the bottom of the dialog (e. g. Field Calculator) is super
> helpful. But it gets cut off after ~60 characters so for longer returns
> you cannot see them fully.
>
> Is there an important reason for that cutoff or would it theoretically
> be possible to display the whole return value (e. g. in a scrollable
> area if needed)? Maybe that would require a safety limit at a couple of
> thousand characters but it would allow for more insight.
>
> Cheers
> Hannes
>
> --
> Johannes Kröger / GIS-Entwickler/-Berater
> WhereGroup GmbH
> Eifelstraße 7
> 53119 Bonn
> Germany
>
> Tel: +49 (0)228 / 90 90 38 - 36
> Fax: +49 (0)228 / 90 90 38 - 11
>
> johannes.kroe...@wheregroup.com
> www.wheregroup.com
> Geschäftsführer:
> Olaf Knopp, Peter Stamm
> Amtsgericht Bonn, HRB 9885
> ---
>
> 
> Where2B Konferenz 2021
> 16. Dezember 2021
> im Universitätsclub Bonn und online
> https://where2b-conference.com/
> 
>
> ___
> 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


[QGIS-Developer] Purpose and function of "referenced_columns" in Python expression functions?

2021-11-22 Thread WhereGroup

Hi list,

https://docs.qgis.org/3.22/en/docs/user_manual/expressions/expression.html#function-editor 
mentions the optional keyword argument "referenced_columns" to the 
`@qgsfunction` decorator. It says


> referenced_columns=[list]: An array of attribute names that are 
required to the function. Defaults to

> [QgsFeatureRequest.ALL_ATTRIBUTES].

That, and examples where it is used in other people's code, led me to 
believe that the feature's attributes would not be accessible unless 
listed in that parameter or if the parameter was omitted (-> default 
value getting used -> default is all attributes).


The default code that gets inserted into the editor includes the 
decorator `@qgsfunction(args='auto', group='Custom', 
referenced_columns=[])` so I'd assume that I would not be able to use 
any attributes in the function.


In reality I can access them just fine though, e. g. `feature["name"]` 
if I had features with a "name" attribute and that default 
`referenced_columns=[]`.


I can even do so if I used `referenced_columns=["foo", "bar"]`! 
`feature["name"]` is still perfectly accessible.


Is this a bug or by design? If by design, what purpose does this 
parameter have?


Thanks
Hannes

--
Johannes Kröger / GIS-Entwickler/-Berater
WhereGroup GmbH
Eifelstraße 7
53119 Bonn
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
---


Where2B Konferenz 2021
16. Dezember 2021
im Universitätsclub Bonn und online
https://where2b-conference.com/




OpenPGP_0xBF7B268A77C202D5.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature
___
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] Unabbreviated expression evaluation preview?

2021-11-22 Thread WhereGroup

Hi list,

when developing QGIS expression the preview string output of the 
evaluation at the bottom of the dialog (e. g. Field Calculator) is super 
helpful. But it gets cut off after ~60 characters so for longer returns 
you cannot see them fully.


Is there an important reason for that cutoff or would it theoretically 
be possible to display the whole return value (e. g. in a scrollable 
area if needed)? Maybe that would require a safety limit at a couple of 
thousand characters but it would allow for more insight.


Cheers
Hannes

--
Johannes Kröger / GIS-Entwickler/-Berater
WhereGroup GmbH
Eifelstraße 7
53119 Bonn
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroe...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
---


Where2B Konferenz 2021
16. Dezember 2021
im Universitätsclub Bonn und online
https://where2b-conference.com/




OpenPGP_0xBF7B268A77C202D5.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature
___
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] Cleaning up the QGIS Developers/QGIS Community groups

2021-11-22 Thread Alessandro Pasotti
On Mon, Nov 22, 2021 at 12:41 AM Nyall Dawson 
wrote:

> On Sun, 21 Nov 2021 at 18:22, Alessandro Pasotti 
> wrote:
> >
> > Yes please, thanks!
>
> Sorry -- turns out I don't have access to modify the QGIS member
> groups. Want me to just collate a list of changes instead?
>
> Nyall
>

Hi Nyall,

you should have enough permissions now, but I'm happy to help if you need.

Kind regards.

-- 
Alessandro Pasotti
QCooperative:  www.qcooperative.net
ItOpen:   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