[Qgis-user] QGIS variables calculated from other variables

Nikolai Bezdna mofoyoda at gmail.com
Wed Jan 13 11:25:14 PST 2016


Sorry, but I meant setting qgis variables, not calculation of attribute field values.

I can use field values for data-driven style properties where possible and recalculate them when needed, but I don’t want to overload db with styling properties for each feature. Also I have some scale dependent rule-based styling, so I would like to have an option to set variable (i.e. @road_width_z1) for just one scale and calculate others (@road_width_z2…) from it on the fly. Like having an expression instead of a constant value.
   
Or do you mean writing a custom function with function editor GUI and then running it every time my project loads?

> On 13 Jan 2016, at 19:54, Nuno de Santos Loureiro <nlourei at ualg.pt> wrote:
> 
> Easy: Field calculator...
> 
> 
> 
> 
> Citando Nikolai Bezdna <mofoyoda at gmail.com>:
> 
>> Is it possible to set qgis variable calculated from another one?
>> Like this: @road_width2 = @road_width1 * 1.5
>> So I can style in a CartoCSS manner - set only the basic variables and calculate lots of others on the fly.
>> That’ll greatly help with some complicated styles.
> 
> 
> 
> Nuno
> 
> 
> -x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-
> Nuno de Santos Loureiro (PhD)
> Faculdade de Ciências e Tecnologia - DCTMA - Ed. 8
> Universidade do Algarve
> Campus de Gambelas
> 8005-139 FARO   (Portugal)
> -x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-
> 
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> 




More information about the Qgis-user mailing list