[Qgis-developer] Support for QGIS variables in Processing

Matthias Kuhn matthias at opengis.ch
Wed Apr 6 06:57:09 PDT 2016


On 04/06/2016 03:40 PM, Victor Olaya wrote:
>> One question I have is if it's required to see variables as an isolated
>> topic outside of expressions. Or if whenever a variable is required, a
>> complete expression would offer much more flexibility.
> That's actually a very good idea. As I said, now I am just trying to
> start with this, and integration is scripts seems an easy first step,
> but eventually, I would like to have support for variables (or even
> better, full expressions) in the textboxes of the algorithm dialog

When populating text boxes which are layer independent in 90% global or
project variables will be what is required.

When populating text boxes which are layer dependent, the scope can be
appropriately populated and forcing the user to explicitly specify the
source layer wouldn't be very userfriendly.

For the other cases where a variable from an independent layer is
required, a new function layer_var('layername', 'varname') could be
introduced that does the background work and could also be used from
other expressions outside processing.

Matthias

-- 
Matthias Kuhn
OPENGIS.ch - https://www.opengis.ch
Spatial • (Q)GIS • PostGIS • Open Source



More information about the Qgis-developer mailing list