[Qgis-developer] Saving expressions

Nathan Woodrow madmanwoo at gmail.com
Thu Oct 18 23:28:32 PDT 2012


We can always have a save button that the user can pick to save a
Application based expression (saved in the QGIS settings), or saved in
the project file. I can see use cases for both.

Nathan

From: Andreas Neumann
Sent: 19/10/2012 4:21 PM
To: Paolo Cavallini
Cc: Nathan Woodrow; qgis-developer
Subject: Re: [Qgis-developer] Saving expressions
 Hi Paolo,

 What do you expect from the loading? Automatic application to the field
 calculator (sounds scary to me), or just the ability to choose from past
 expressions?

 If the latter, then maybe a central expression storage (per user) would
 make more sense than a per layer expression store. Because you may want
 to reuse the same expression on another similar layer, even in different
 projects.

 To me the expressions do not have a natural 1:1 match to a layer like
 the .prj or the .qml file has.

 But I can see value in a central storage of expressions used in the
 past, regardless of layer and QGIS project. But it would just be used as
 a way to load and save expressions as templates to start from and not an
 automatic application to some calculation or the label engines. These
 settings should be better stored in the project itself rather than in a
 separate file.

 Do we agree on that or did I misunderstand you?

 Andreas

 On Fri, 19 Oct 2012 07:58:57 +0200, Paolo Cavallini wrote:
> Il 19/10/2012 07:51, Andreas Neumann ha scritto:
>> For me personally, copy/paste works fine. No need for load and save.
>>
>> I do not fully understand the use case for autoloading (association
>> with a layer). Can you explain why this is desirable? Do you really
>> always want the same expression in all projects for one particular
>> layer?
> I think users will fin useful to have their expression per layer, so
> they can refresh a field with the same calculation, without the need
> to
> rememberwhich formula they used (very stupi example: refreshing the
> AREA
> field). In this way, a DBF can be used almost like a spreadsheet.
> For advanced users it is probably useless, for newbies it can save a
> loto of time, effort and frustration remembering which expression
> they
> used, what is the exact syntax, where (if) they copied the expression
> somewhere, etc.
>
> All the best.

-- 
 --
 Andreas Neumann
 Böschacherstrasse 10A
 8624 Grüt (Gossau ZH)
 Switzerland


More information about the Qgis-developer mailing list