3

I would like to automate a process in QGIS 3.0.

The process is:

  1. Open raster calculator and calculate a bands operation (Sentinel 2 bands).

  2. Create dots (centroid of pixel) into several pre-existing polygons.

  3. Open the plug in "point sampling tool" and give to the dots, created in the previous step, the value of the corresponding pixel.

  4. Open GRASS tool v.surf.idw and process the algorithm for every group of dots created in step 3.

  5. Cut the raster created in step 4 to the corresponding polygon.

  6. Select some colours for the cut raster choosing the option singleband pseudocolours.

As I have to do this process for several polygons, it's taking a long time so I would like to automate it; is it possible?

1 Answer 1

1

For easy automation in QGIS, you should look at the Graphical Modeler. This tool allows you to automate a workflow using all the tools in the Processing Toolbox. Since you already have your workflow figured out, it should be quite simple to implement as a graphic model.

However, I don't think you can use a plugin directly as part of a processing modeler. This leaves two options:

  1. Create two models, one for steps 1-2, and another model for steps 4-6. You would run the first model for all the polygons, then manually run the plugin, then run the second model.
  2. Write a python script to run the plugin. Use the python script in a graphic model for the entire process.

Note: The graphical modeler (sometimes referred to as the processing modeler) is a well-documented core feature of QGIS. A quick internet search of "qgis graphical modeler" will turn up many tutorials.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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