Saturday 21 July 2018

Update multiple fields/columns in QGIS


I need to update fields in attribute table of a vector using QGIS. I use field calculator for each field, but i have too many fields (and too many vectors also) and i need to program the task. The code that i'm using for each first field is:



segALD00*(((xmin($geometry) - xmax($geometry))^2+(ymin($geometry) - ymax($geometry))^2)^0.5)*102.47/longkm



to the last field




segALD23*(((xmin($geometry) - xmax($geometry))^2+(ymin($geometry) - ymax($geometry))^2)^0.5)*102.47/longkm



Then another vector:



segETH00*(((xmin($geometry) - xmax($geometry))^2+(ymin($geometry) - ymax($geometry))^2)^0.5)*102.47/longkm



to the last field



segETH23*(((xmin($geometry) - xmax($geometry))^2+(ymin($geometry) - ymax($geometry))^2)^0.5)*102.47/longkm




How can i code this?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...