[Qgis-user] Modeler-only tools: Calculator

Bernd Vogelgesang bernd.vogelgesang at gmx.de
Sun Aug 9 07:07:15 PDT 2015


Hi,

In my search for a solution for the problem, that number input variables
in a model can't be referred to in the field calculator (while string
inputs, though it doesn't make any sense, can):
2 years old http://hub.qgis.org/issues/8743
http://gis.stackexchange.com/q/72569

I found the modeler-only tools Calculator, which indeed lists all
numerical inputs.

This tool doesn't come with any explanation besides: "You can refer to
model values in your formula, using single-letter variables, as follows:

a->Gridsize

and

[Enter your formula here]

Ok, so when I enter a formula there, what next????

When I put  - a - there, cause I just want this value, and try to use - a
- in the field calculator, it does not work.

Furthermore: The formula has disappeared after reopening the function:
http://hub.qgis.org/issues/11434#note-9

It does not seem to be usable at all.

And it destroyed my three-days work on a model, cause by mistake  I
entered nothing and hit ok and saved the thing, which caused a python
error and the model can't be opend again.

Only the fact that I work on a cloud where I can restore my last version
   from yesterday has saved my ass. (Working locally, the hole work would
have been gone forever!).

There seems to be no way to get rid of that function from the model
manually in a text editor, identifying the section and removing it still
leaves a crippled model which refuses to load.

Questions:
Is there anyone around who is able to explain me the structure of a model
file or point to least some minimal documentation?. Why do nearly every
manual operations on a model in an editor destroy them, and how can I
avoid this?

Does anyone know how to use this Calculator without destroying the model?

Is there any workaround for referencing numerical input in the field
calculator.

Cheers
Bernd

QGIS2.8.3, Linux Mint 17




-- 
Bernd Vogelgesang
Siedlerstraße 2
91083 Baiersdorf/Igelsdorf
Tel: 09133-825374



More information about the Qgis-user mailing list