public
Last active

Buffer

  • Download Gist
gistfile1.py
Python
1 2 3 4 5 6
lyr = qgis.utils.iface.activeLayer()
lyr.select([])
 
for feature in lyr:
buff = feat.geometry().buffer(5,2)
lyr.dataProvider().changeGeometryValues({feat.id(): buff})

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.