` `

The toolbox

The Toolbox is the main element of the processing GUI, and the one that you are more likely to use in your daily work. It shows the list of all available algorithms grouped in different blocks, and it is the access point to run them, whether as a single process or as a batch process involving several executions of the same algorithm on different sets of inputs.

../../../_images/toolbox3.png

Caja de Herramientas de Procesamiento

The toolbox contains all the available algorithms, divided into so-called “Providers”.

Providers can be (de)activated in the settings dialog. A label in the bottom part of the toolbox will remind you of that whenever there are inactive providers. Use the link in the label to open the settings window and set up providers. We will discuss the settings dialog later in this manual.

By default, only providers that do not rely on third-party applications (that is, those that only require QGIS elements to be run) are active. Algorithms requiring external applications might need additional configuration. Configuring providers is explained in a later chapter in this manual.

In the upper part of the toolbox, you will find a text box. To reduce the number of algorithms shown in the toolbox and make it easier to find the one you need, you can enter any word or phrase on the text box. Notice that, as you type, the number of algorithms in the toolbox is reduced to just those that contain the text you have entered in their names.

If there are algorithms that match your search but belong to a provider that is not active, an additional label will be shown in the lower part of the toolbox.

If you click on the link in that label, the list of algorithms will also include those from inactive providers, which will be shown in light gray. A link to active each inactive provider is also shown.

../../../_images/toolbox_search2.png

Processing Toolbox showing search results

To execute an algorithm, just double-click on its name in the toolbox.

El cuadro de diálogo de algoritmo

Once you double-click on the name of the algorithm that you want to execute, a dialog similar to that in the figure below is shown (in this case, the dialog corresponds to the ‘Polygon centroids’ algorithm).

../../../_images/parameters_dialog.png

Diálogo de parámetros

This dialog is used to set the input values that the algorithm needs to be executed. It shows a list of input values and configuration parameters to be set. It of course has a different content, depending on the requirements of the algorithm to be executed, and is created automatically based on those requirements.

Aunque el número y el tipo de parámetro dependen de las características del algoritmo, la estructura es similar para todos ellos. Los parámetros encontrados en la tabla pueden ser de uno de los siguientes tipos.

  • A raster layer, to select from a list of all such layers available (currently opened) in QGIS. The selector contains as well a button on its right-hand side, to let you select filenames that represent layers currently not loaded in QGIS.

  • A vector layer, to select from a list of all vector layers available in QGIS. Layers not loaded in QGIS can be selected as well, as in the case of raster layers, but only if the algorithm does not require a table field selected from the attributes table of the layer. In that case, only opened layers can be selected, since they need to be open so as to retrieve the list of field names available.

    You will see an iterator button by each vector layer selector, as shown in the figure below.

    ../../../_images/vector_iterator.png

    Vector iterator button

    Si el algoritmo contiene varios de ellos, será capaz de cambiar cada uno de ellos. Si el botón correspondiente a una entrada vectorial se cambia, el algoritmo será ejecutado iterativamente en cada uno de sus elementos, en lugar de sólo una vez para toda la capa, produciendo mayor cantidad de salidas como veces que se ejecuta el algoritmo. Esto permite la automatización del proceso cuando todas las características de una capa tienen que ser procesados por separado.

  • A table, to select from a list of all available in QGIS. Non-spatial tables are loaded into QGIS like vector layers, and in fact they are treated as such by the program. Currently, the list of available tables that you will see when executing an algorithm that needs one of them is restricted to tables coming from files in dBase (.dbf) or Comma-Separated Values (.csv) formats.

  • An option, to choose from a selection list of possible options.

  • A numerical value, to be introduced in a spin box. You will find a button by its side. Clicking on it, you will open the expression builder that allows you to enter a mathematical expression, so you can use it as a handy calculator. Some useful variables related to data loaded into QGIS can be added to your expression, so you can select a value derived from any of these variables, such as the cell size of a layer or the northernmost coordinate of another one.

../../../_images/number_selector.png

Entrada basada en expresión

  • A range, with min and max values to be introduced in two text boxes.

  • A text string, to be introduced in a text box.

  • A field, to choose from the attributes table of a vector layer or a single table selected in another parameter.

  • A coordinate reference system. You can type the EPSG code directly in the text box, or select it from the CRS selection dialog that appears when you click on the button on the right-hand side.

  • An extent, to be entered by four numbers representing its xmin, xmax, ymin, ymax limits. Clicking on the button on the right-hand side of the value selector, a pop-up menu will appear, giving you three options:

    • to select the value from a layer or the current canvas extent,
    • to define it by dragging directly onto the map canvas, or
    • to use the minimum coverage from all input layers.
    ../../../_images/extent.png

    Selector de extensión

    Si se selecciona la primera opción, se verá una ventana como la siguiente.

    ../../../_images/extent_list.png

    Lista de Extensión

    Si se selecciona la segunda opción, la ventana de parámetros se ocultará, para que se pueda definir el rectángulo haciendo click y arrastrando dentro del lienzo. Una vez hecho esto, el cuadro de diálogo reaparecerá, con los valores correspondientes ya rellenos en en cuadro de texto.

    ../../../_images/extent_drag1.png

    Arrastrar Extensión

  • A list of elements (whether raster layers, vector layers or tables), to select from the list of such layers available in QGIS. To make the selection, click on the small button on the left side of the corresponding row to see a dialog like the following one.

    ../../../_images/multiple_selection.png

    Selección Múltiple

  • A small table to be edited by the user. These are used to define parameters like lookup tables or convolution kernels, among others.

    Click en el botón del lado derecho para ver la tabla y editar sus valores.

    ../../../_images/fixed_table.png

    Tabla Fija

    Dependiendo del algoritmo, el número de filas que pueden ser modificadas o no al utilizar los botones del lado derecho de la ventana.

Along with the Parameters tab, you will find another tab named Log. Information provided by the algorithm during its execution is written in this tab, and allow you to track the execution and be aware and have more details about the algorithm as it runs. Notice that not all algorithms write information to this tab, and many of them might run silently without producing any output other than the final files.

On the right hand side of the dialog you wil find a short description of the algorithm, which will help you understand its purpose and its basic ideas. If such a description is not available, the description panel will not be shown.

Some algorithms might have a more detailed help file, which might include description of every parameter it uses, or examples. In that case, you will find a Help tab in the parameters dialog.

Un comentario sobre proyecciones

Algorithms that are run from the processing framework — this is also true for most of the external applications whose algorithms are exposed through it — do not perform any reprojection on input layers and assume that all of them are already in a common coordinate system and ready to be analyzed. Whenever you use more than one layer as input to an algorithm, whether vector or raster, it is up to you to make sure that they are all in the same coordinate system.

Note that, due to QGIS’s on-the-fly reprojecting capabilities, although two layers might seem to overlap and match, that might not be true if their original coordinates are used without reprojecting them onto a common coordinate system. That reprojection should be done manually, and then the resulting files should be used as input to the algorithm. Also, note that the reprojection process can be performed with the algorithms that are available in the processing framework itself.

By default, the parameters dialog will show a description of the CRS of each layer along with its name, making it easy to select layers that share the same CRS to be used as input layers. If you do not want to see this additional information, you can disable this functionality in the Processing settings dialog, unchecking the Show CRS option.

If you try to execute an algorithm using as input two or more layers with unmatching CRSs, a warning dialog will be shown.

Aún se puede ejecutar el algoritmo, pero en la mayoría de los casos se producirán resultados incorrectos, como capas vacias debido a que las capas de entrada no se solapan.

Resultados generados por algoritmos

Los tipos de resultados que se pueden generar cor un algoritmo son los siguientes:

  • Una capa ráster.

  • Una capa vectorial.

  • Una tabla

  • Un archivo HTML (usado para salidas de texto y salidas gráficas).

These are all saved to disk, and the parameters table will contain a text box corresponding to each one of these outputs, where you can type the output channel to use for saving it. An output channel contains the information needed to save the resulting object somewhere. In the most usual case, you will save it to a file, but in the case of vector layers, and when they are generated by native algorithms (algorithms not using external applications) you can also save to a PostGIS or Spatialite database, or a memory layer.

To select an output channel, just click on the button on the right side of the text box, and you will see a small context menu with the available options.

In the most usual case, you will select saving to a file. If you select that option, you will be prompted with a save file dialog, where you can select the desired file path. Supported file extensions are shown in the file format selector of the dialog, depending on the kind of output and the algorithm.

The format of the output is defined by the filename extension. The supported formats depend on what is supported by the algorithm itself. To select a format, just select the corresponding file extension (or add it, if you are directly typing the file path instead). If the extension of the file path you entered does not match any of the supported formats, a default extension will be appended to the file path, and the file format corresponding to that extension will be used to save the layer or table. Default extensions are .dbf for tables, .tif for raster layers and .shp for vector layers. These can be modified in the setting dialog, selecting any other of the formats supported by QGIS.

If you do not enter any filename in the output text box (or select the corresponding option in the context menu), the result will be saved as a temporary file in the corresponding default file format, and it will be deleted once you exit QGIS (take care with that, in case you save your project and it contains temporary layers).

You can set a default folder for output data objects. Go to the settings dialog (you can open it from the Processing menu), and in the General group, you will find a parameter named Output folder. This output folder is used as the default path in case you type just a filename with no path (i.e., myfile.shp) when executing an algorithm.

Al ejecutar un algoritmo que utiliza una capa vectorial en modo iterativo, la ruta del archivo introducido se utiliza como la ruta de la base para todos los archivos generados, los cuales se denominan utilizando el nombre base y añadiendo un número que representa el índice de la iteración. La extensión del archivo (y el formato) se utiliza para todos los archivos generados.

Apart from raster layers and tables, algorithms also generate graphics and text as HTML files. These results are shown at the end of the algorithm execution in a new dialog. This dialog will keep the results produced by any algorithm during the current session, and can be shown at any time by selecting Processing ‣ Results viewer from the QGIS main menu.

Algunas aplicaciones externas pueden tener archivos (sin restricciones de extensión particulares) como de salida, pero no pertenece a ninguna de las categorías anteriores. Esos archivos de salida no serán procesadas por QGIS (abierto o incluido en el proyecto actual de QGIS), ya que la mayor parte del tiempo que corresponden a formatos de archivo o elementos no compatibles con QGIS. Esto es, por ejemplo, en el caso de archivos LAS utilizados para datos LiDAR. Los archivos se crean, pero no se ve nada nuevo en su sesión de trabajo en QGIS.

Para todos los otros tipos de salida, encontrará una casilla de verificación que se puede utilizar para decirle al algoritmo si se debe cargar el archivo una vez que se genera por el algoritmo o no. Por defecto, se abren todos los archivos.

Optional outputs are not supported. That is, all outputs are created. However, you can uncheck the corresponding checkbox if you are not interested in a given output, which essentially makes it behave like an optional output (in other words, the layer is created anyway, but if you leave the text box empty, it will be saved to a temporary file and deleted once you exit QGIS).

Configuring the processing framework

As has been mentioned, the configuration menu gives access to a new dialog where you can configure how algorithms work. Configuration parameters are structured in separate blocks that you can select on the left-hand side of the dialog.

Along with the aforementioned Output folder entry, the General block contains parameters for setting the default rendering style for output layers (that is, layers generated by using algorithms from any of the framework GUI components). Just create the style you want using QGIS, save it to a file, and then enter the path to that file in the settings so the algorithms can use it. Whenever a layer is loaded by Processing and added to the QGIS canvas, it will be rendered with that style.

Rendering styles can be configured individually for each algorithm and each one of its outputs. Just right-click on the name of the algorithm in the toolbox and select Edit rendering styles for outputs. You will see a dialog like the one shown next.

../../../_images/rendering_styles.png

Rendering Styles

Select the style file (.qml) that you want for each output and press [OK].

Other configuration parameters in the General group are listed below:

  • Use filename as layer name. The name of each resulting layer created by an algorithm is defined by the algorithm itself. In some cases, a fixed name might be used, meaning that the same output name will be used, no matter which input layer is used. In other cases, the name might depend on the name of the input layer or some of the parameters used to run the algorithm. If this checkbox is checked, the name will be taken from the output filename instead. Notice that, if the output is saved to a temporary file, the filename of this temporary file is usually a long and meaningless one intended to avoid collision with other already existing filenames.
  • Keep dialog open after running algorithm. Once an algorithm has finished execution and its output layers are loaded into the QGIS project, the algorithm dialog is closed. If you want to keep it open (to run the algorithm again with different parameters, or to better check the output that is written to the log tab), check this option
  • Use only selected features. If this option is selected, whenever a vector layer is used as input for an algorithm, only its selected features will be used. If the layer has no selected features, all features will be used.
  • Pre-execution script file and Post-execution script file. These parameters refer to scripts written using the processing scripting functionality, and are explained in the section covering scripting and the console.

Apart from the General block in the settings dialog, you will also find a block for algorithm providers. Each entry in this block contains an Activate item that you can use to make algorithms appear or not in the toolbox. Also, some algorithm providers have their own configuration items, which we will explain later when covering particular algorithm providers.