I am working under Qgis 2.16.0 and i am trying to make a script using the grass module r.water.oulet. This module has 5 parameters :
1 - Name of input raster 2 - coordinates of outlet point (x,y) 3 - area of the Grass region (xmin, xmax, ymin, ymax) 4 - Celle size of Grass Region 5- Output file
When i use the module in Qgis I don't need to set the area of Grass region. But if d'ont set it in python command :
processing.runalg('grass:r.water.outlet', "D:\Developpement\Debits_cartes_alea\Donnees_test\flow_direction.tif",936400.018,6432568.853,None,0.0,"D:\Developpement\Debits_cartes_alea\Donnees_test\1sortie.tif")
I have this error message : "Error: Wrong parameter value: None"
So I try to set the required coordinates like this :
processing.runalg('grass:r.water.outlet', "D:\Developpement\Debits_cartes_alea\Donnees_test\flow_direction.tif",936400.018,6432568.853,['933963.950608,940746.141038,6431270.66542,6434790.6058'],0.0,"D:\Developpement\Debits_cartes_alea\Donnees_test\1sortie.tif")
Then I have this error message : "Error: Wrong parameter value: ['933963.950608,940746.141038,6431270.66542,6434790.6058']"
Does that come from the syntax or is ther the problem with the values (note that I try with the same values in module and it's work !)