I have the following code that executes the v.clean processing plugin:

params = {
        'input' : input,
        'type' : 1,
        'tool' : 1,
        'threshold' : 0.000095,
        'output': output,
        'error' : error,

processing.run('grass7:v.clean', params)

This code only executes the snap tool inside v.clean so far and works fine.

What I try to achieve is, that v.clean runs multiple tools (snap, break, rmdangle) at once, without restarting v.clean over and over again. So I need more than one input for 'tool' and 'threshold'. I also want the tools to be executed in exactly the above stated sequence: 1. snap, 2. break, 3. rmdangle.

My problem is that I do not know how to seperate these inputs. I tried seperating them by commas and writing them as a string ('1, 0, ...',), but so far I only get an invalid syntaxerror. The documentation and the algorithmHelp did not answer my question. Can anyone explain how to seperate multiple inputs for a single parameter?

Your Answer

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

Browse other questions tagged or ask your own question.