Here is a python solution for you.
But before starting, you can always ask the python console for help in populating the parameters like this:
print(help(processing.algorithmHelp('qgis:buffer'))
print(help(processing.algorithmHelp('qgis:extractbylocation'))
print(help(processing.algorithmHelp('qgis:mergevectorlayers'))
Also, to populate the dictionaries I used to run these three tools, I first ran the widget. Then I looked in the log panel for the results and directly copied the python code from that into the dictionaries.
import processing
buffer_parameters = {
'INPUT' : '/Users/ep9k/Desktop/Example.gpkg|layername=Example',
'DISTANCE' : 0.01, #this is in decimal degrees, yours will probably be different
'SEGMENTS' : 5,
'END_CAP_STYLE' : 0,
'MITER_LIMIT' : 2,
'DISSOLVE' : False,
'OUTPUT' : 'memory:'}
buffer = processing.run('qgis:buffer', buffer_parameters)
extraction_parameters = {
'INPUT': 'Polygon?crs=EPSG:4326&field=fid:long&uid={d7feac26-7116-4f01-b1ba-866501ab700b}', #this is a memory layer, yours could be different
'PREDICATE': [0],
'INTERSECT': 'Polygon?crs=EPSG:4326&field=fid:long&uid={d7feac26-7116-4f01-b1ba-866501ab700b}', #this is also a memory layer
'OUTPUT' : 'memory:'}
extract_by_location = processing.run('qgis:extractbylocation', extraction_parameters)
merge_parameters = {
'LAYERS': ['/Users/ep9k/Desktop/Example2.shp','Polygon?crs=EPSG:4326&field=fid:long&uid={f2afdb7d-4ff4-4850-99c0-43d5989c54fd}'], #this is just a list of layers
'CRS': QgsCoordinateReferenceSystem('EPSG:102003'),
'OUTPUT': 'memory:'}
merge_vector_layers = processing.runAndLoadResults('qgis:mergevectorlayers', merge_parameters) #notice mergeAndLoadResults here, I want to see this output
Let me know if you have further questions.