import processing params = 'INPUT': vector_layer, 'DISTANCE': 0.05, # Distance in layer CRS units 'SEGMENTS': 5, 'END_CAP_STYLE': 0, 'JOIN_STYLE': 0, 'MITER_LIMIT': 2, 'DISSOLVE': False, 'OUTPUT': '/path/to/output/buffered_cities.gpkg' # Execute tool synchronously result = processing.run("native:buffer", params) # Load the output back into the project buffered_layer = QgsVectorLayer(result['OUTPUT'], "Buffered Cities", "ogr") QgsProject.instance().addMapLayer(buffered_layer) Use code with caution.
: A brief introduction to Python 3 tailored for GIS tasks. pyqgis programmer 39s guide 3 pdf work
Workflow 1: Automated Vector Data Cleaning and Feature Filtering import processing params = 'INPUT': vector_layer