Skip to main content
1 of 2
cabesuon
  • 1.1k
  • 6
  • 8

One way could be,

d = QgsDistanceArea()
d.setEllipsoid('WGS84')
layer = iface.activeLayer() 
feature = layer.getFeatures()
for feat in feature:
    print(
        d.convertAreaMeasurement(
            d.measureLength(feat.geometry()),
            1
        )
    )
cabesuon
  • 1.1k
  • 6
  • 8