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.
1 Answer 1
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>
...
Explore related questions
See similar questions with these tags.