It seems that there are at least two different ways to calculate the area of a polygon in QGIS using Python:
1) area = feature.geometry().area() 2) d = QgsDistanceArea() area_v2 = d.measurePolygon(feature.geometry().asPolygon())
These two approaches produce very similar outcomes, but not the same. It also seems that QGIS prefers the second approach -once the geometry column is added through Vector -> Export/Add Geometry Columns. Presumingly, this is related with the projections. However, everything I deal on QGIS is on EPSG:3857 since I am using OSM data. Furthermore, the perimeter values obtained from this approach match with the first approach when the following statement is executed:
perimeter = feature.geometry().length()
I am inclined to choose the first approach due to its simplicity, so why does QGIS rely on the second approach?