[QGIS-ZA-user] Creating batch jobs from using Grass inside QGIS 3.4

admire addloe at gmail.com
Fri Sep 13 06:32:01 PDT 2019


Hi Zoltan


On 2019/09/13 14:43, Zoltan Szecsei via qgis-za-user wrote:
> Hi Listers,
> I'm using Grass 7.6 inside QGIS 3.4 (installed via OSGEO4W64)
>
> I'm needing to set up a chain of tasks involving rasterizing polygons, 
> thinning them and putting them back into vector formats.
> There are many steps involved, and I am experimenting with a large 
> number of parameters available in each step - so doing this through 
> the GUI is tedious.
>
> Is there a way to capture the grass commands and parameters I have 
> chosen in the GUI?
> I have traced much of them into users/appdata/local/blah blah, but 
> then they reference other files wherein my GUI params are listed, and 
> piecing this lot together, as my first attempt at using Grass, is not 
> massively intuitive (no, I have not RTFM'd  :-)  )

If you are using the algorithms from the processing toolbox you simply 
have to navigate to the Processing Menu > History and you will see that 
each algorithm has been captured

as a processing.run with all the parameters captures there. You can then 
just run the processing.run() algorithms within the python console or 
create a script that will incorporate them.

Regards

>
> If I can create a batch file chaining all the steps together, I could 
> then run and tweak that in powershell (or even cmd.exe)  - and test 
> different options more quickly.
>
> Thanks for any pointers that might be offered.
> Regards,
> Zoltan
> PS: Yes, I could go through the Grass manuals and see all the params, 
> but hacking is so much easier :-)
>


More information about the qgis-za-user mailing list