I'm trying to use the Advanced Python field calculator in a script like so:
processing.runalg('qgis:advancedpythonfieldcalculator', output_layer, 'Latitude', 1, 12, 5, '', '$y', output_layer2)
Not sure exactly how to put the arguments
ALGORITHM: Advanced Python field calculator
INPUT_LAYER <ParameterVector>
FIELD_NAME <ParameterString>
FIELD_TYPE <ParameterSelection>
FIELD_LENGTH <ParameterNumber>
FIELD_PRECISION <ParameterNumber>
GLOBAL <ParameterString>
FORMULA <ParameterString>
OUTPUT_LAYER <OutputVector>
Particularly, the GLOBAL and FORMULA args. Docs don't show much on this.. I'm getting a return of an empty file (i.e. no points), but the attribute table has the new field name in it. Any ideas?