Field calculater in Python console from QGIS

المشرف العام

Administrator
طاقم الإدارة
I have some doubts in syntax of processing.runalg(qgis:fieldcalculator) in python console of QGIS. I want to create a new field in a shapefile and calculate this formula: [D_PATRICIA]*1000. (D_PATRICIA= is another field form the table of shapefile that contain values).

I try to do this and retrieved me a shapefile with the new field (p_mm) but without values:

processing.runalg('qgis:fieldcalculator', str4, "p_mm", 1, 6, 6, True, '[D_PATRICIA]*1000', str5)What should be the problem? I think the problem is in the formula parameter. Any idea to help me?



أكثر...
 
أعلى