Skip to main content
1 of 2
vinayan
  • 7.3k
  • 3
  • 37
  • 76

the Line,

feature = layer.selectedFeatures() 

returns a list of QgsFeature. You will need to loop over it to process individual selections.

If you only have one feature selected in map, then

geom = feature[0].geometry()
mbuf = geom.buffer(50, 2)

might work.

vinayan
  • 7.3k
  • 3
  • 37
  • 76