2

Is there a way to integrate my own custom tools into the Processing toolbox in QGIS? I believe I have found where to strategically hack the stock processing scripts to ensure it picks up my custom provider (python/plugins/processing/core/Processing.py) but I can't figure out if there's a less kludgy way to register things.

I can't find any tutorials or anything so hoping that someone has either done this or can walk me through it.

3

Processing provides example code for a new algorithm provider. It's located in the processing folder inside your home directory, e.g. on my machine:

C:\Users\anita\.qgis2\python\plugins\processing\algs\exampleprovider

Based on these example files, you can build your own plugin which can contain as many new algorithms as you want.

  • 2
    Thanks. I found the example provider code but hadn't noticed the plugin element. This is exactly what I needed. Would be good to add some documentation on this. Maybe I'll do this when I have some free time. – spencerrecneps Jul 25 '15 at 21:49
  • I didn't see neither the 'example provider' in the list of provider available in qgis 2.8.1. When I run the command processing.Processing.providers, I don't see the exempleprovider in the list. I try to put on .qgis2\python\plugins\processing. \algs\exampleprovider, on .qgis2\python\ but it doesn't work. Why am I missing ? – lejedi76 Sep 23 '15 at 14:03
  • I just found this qa. Did you ever find out what the preferred way is to deploy and register your custom provider with QGIS? – Sideshow Bob Dec 1 '15 at 13:50
0

I know this is an old post with an accepted answer, however I could not find a solution for newer versions of QGIS. As of QGIS 2.14+ there are two main techniques to create a new plugin that adds its functionality as Processing algorithms:

  • Creating a plugin that adds an algorithm provider: This options is more complex, but provides more flexibility.
  • Creating a plugin that contains a set of processing scripts: The simplest solution, you just need a set of Processing script files.

This and more details can be found in the documentation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.