QgsGeometry buffer is a function in the QGIS core library of python. It is used to create a buffer around a given geometry object. The buffer is created by drawing a polygon at a certain distance from the geometry object.
This code creates a point geometry object at (5,5) and then creates a buffer polygon around it. The buffer has a radius of 1.5 and is made up of 5 segments.
This code reads in a shapefile layer, loops through each feature in the layer, creates a buffer geometry around each feature, replaces the original geometry with the buffered geometry, and updates the layer.
The package library used for this code example is the QGIS core library for Python.
Python QgsGeometry.buffer - 30 examples found. These are the top rated real world Python examples of qgis.core.QgsGeometry.buffer extracted from open source projects. You can rate examples to help us improve the quality of examples.