I am trying to find area and perimeters of Polygon using Pyqgis3. I tried manually first Vector->Geometry Tools->Add Geometry Attributes. By doing so, I get the area and perimeter column in the attribute table. I would like to automate this process by using python -console inside qgis. I tried the following code, but i get " Algorithm addgeometryattributes" not found.



The algorithm id has different name in QGIS 3. It is qgis:exportaddgeometrycolumns as you can see below:

enter image description here

Try to use the above id name, and check if it works.

  • Hi does this give a correct area in metre^2 if the coordinate system of my shape file is WGS 84 / UTM zone 43N ESPG:32643 ? – ps1 May 4 '19 at 19:52
  • I do not understand what you mean, but the unit of WGS 84 / UTM zone 43N EPSG:32643 is in meter, and thus, the area will be in meter square. epsg.io/32643. Anyway if you have a new question, please ask in a new thread. – ahmadhanb May 5 '19 at 2:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.