2

After playing around with the QGIS Modeler and looking at the python scripts of what I make, I noticed some syntax which I can't find the definition anywhere. Here is a snippet of the python script from a model:

outputs_13=processing.runalg("qgis:fieldcalculator", outputs_12['SAVENAME'], ID, 1, 10, 0, True, $rownum , None)
outputs_14=processing.runalg("qgis:deletecolumn", outputs_13['OUTPUT_LAYER'], longitude, None)
outputs_15=processing.runalg("qgis:deletecolumn", outputs_14['SAVENAME'], latitude, savename_alg15)
outputs_16=processing.runalg("qgis:clip", outputs_15['SAVENAME'], vectorlayer_layer1, None)
outputs_17=processing.runalg("qgis:fieldcalculator", outputs_16['OUTPUT'], Score, 0, 10, 0, True, 2, output_layer_alg17)

Can someone please explain the purpose of ['SAVENAME'], ['OUTPUT'] and ['OUTPUT_LAYER']?

I am trying to develop a script but keep getting errors linked to these terms and I am unsure as to how they are used.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked May 29, 2014 at 12:35

1 Answer 1

3

Look at Using processing algorithms from the console

import processing 
processing.alghelp("qgis:fieldcalculator")
 ALGORITHM: Field calculator
 INPUT_LAYER <ParameterVector>
 FIELD_NAME <ParameterString>
 FIELD_TYPE <ParameterSelection>
 FIELD_LENGTH <ParameterNumber>
 FIELD_PRECISION <ParameterNumber>
 NEW_FIELD <ParameterBoolean>
 FORMULA <ParameterString>
 OUTPUT_LAYER <OutputVector>
 FIELD_TYPE(Field type)
 0 - Float
 1 - Integer
 2 - String
 3 - Date
processing.alghelp("qgis:deletecolumn")
ALGORITHM: Delete column
LAYERNAME <ParameterVector>
COLUMN <ParameterTableField from LAYERNAME>
SAVENAME <OutputVector>
...
answered May 29, 2014 at 17:22
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.