7 votes
Accepted

Where is the source code for the Processing Plugin "Buffer"?

The buffer algorithm is implemented in C++: https://github.com/qgis/QGIS/blob/fbc2082b7e25042c5f82cb000c52d84625b31624/src/analysis/processing/qgsalgorithmbuffer.cpp The Buffer.py file you found is ...
bugmenot123's user avatar
  • 10.8k
6 votes
Accepted

Generating offset line from MultiLineString in QGIS

Try the "Translate" tool in the Processing Toolbox (Ctrl+Alt+T) (under Vector Geometry). Set the x-axis to whatever distance you want to create the copy: Output similar to the following:
Tom Brennan's user avatar
  • 3,860
5 votes

Problem to interface a script with python in QGIS

Add import processing to import section to get rid of NameError. Since you use self.parameterAsSource, you get NoneType object .. error. Instead, use self.parameterAsRasterLayer. Use the script below....
Kadir Şahbaz's user avatar
2 votes

Installing a custom Processing algorithm for all users

The quick and dirty solution would be to add your script to the existing QGIS processing provider: Edit your script alg.py: add the import: from processing.algs.qgis.QgisAlgorithm import ...
Louis Cottereau's user avatar
1 vote
Accepted

Run processing tools in Python console

In the params you have the output 'output', which is just a string. But you need to use the variable output Then replace processing.run(algo, params) with the following: processing.runAndLoadResults(...
fsg's user avatar
  • 652
1 vote

PyQGIS, custom processing algorithm: How to use selected features only?

The methods parameterAsLayer, parameterAsRasterLayer, and parameterAsVectorLayer of qgis.core.QgsProcessingAlgorithm evaluate complete map layers of the QGIS project (or usable files from outside of ...
winnewoerp's user avatar
  • 1,291

Only top scored, non community-wiki answers of a minimum length are eligible