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.
Figure Processing 5:
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.
Figure Processing 6:
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.
Figure Processing 7:
Para executar um algoritmo, faça duplo clique no seu nome na caixa de ferramentas.
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).
Figure Processing 8:
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.
Although the number and type of parameters depend on the characteristics of the algorithm, the structure is similar for all of them. The parameters found in the table can be of one of the following types.
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.
Irá ver um botão por cada seleccionador de camada vectorial, como é exibido na figura em baixo.
Figure Processing 9:
If the algorithm contains several of them, you will be able to toggle just one of them. If the button corresponding to a vector input is toggled, the algorithm will be executed iteratively on each one of its features, instead of just once for the whole layer, producing as many outputs as times the algorithm is executed. This allows for automating the process when all features in a layer have to be processed separately.
Uma opção, a escolher de uma lista de selecção de uma lista de opções possíveis.
Figure Processing 10:
Um intervalo, com valores min e máx para serem introduzidos em duas caixas de texto.
Uma cadeia de texto, a ser introduzida na caixa de texto.
Um campo, para escolher a partir de uma tabela de atributos de uma camada vectorial ou uma tabela única de outro parâmetro.
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 two options: to select the value from a layer or the current canvas extent, or to define it by dragging directly onto the map canvas.
Figure Processing 11
Se seleccione a primeira opção, irá ver uma janela igual a próxima.
Figure Processing 12
Se seleccionar o segundo, os parâmetros da janela irão esconder-se, para que possa clicar e arrastar para o enquadramento. Uma vez definido o rectângulo seleccionado, o diálogo irá reaparecer, contendo os valores na caixa de texto da extensão.
Figure Processing 13:
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.
Figure Processing 14:
Uma pequena tabela para ser editada pelo utilizador. Estes são usados para definir os parâmetros como tabelas lookup ou kernels de convolução, entre outros.
Clique no botão do lado direito para ver a tabela e editar os seus valores.
Figure Processing 15:
Depending on the algorithm, the number of rows can be modified or not by using the buttons on the right side of the window.
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.
Algorithms that are run from the processing framework — this is also true of 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.
Pode continuar a executar o algoritmo, mas tenha atenção que na maioria dos casos irá produzir resultados errados, tais como, camadas vazias devido à falta de sobreposição das camadas usadas como ficheiros de entrada.
Objectos de dados gerado por um algoritmo podem ser dos seguintes tipos:
Uma camada raster
Uma camada vectorial
Uma tabela
Um ficheiro HTML (usado para ficheiro de saída de texto e gráficos)
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.
When running an algorithm that uses a vector layer in iterative mode, the entered file path is used as the base path for all generated files, which are named using the base name and appending a number representing the index of the iteration. The file extension (and format) is used for all such generated files.
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.
Some external applications might have files (with no particular extension restrictions) as output, but they do not belong to any of the categories above. Those output files will not be processed by QGIS (opened or included into the current QGIS project), since most of the time they correspond to file formats or elements not supported by QGIS. This is, for instance, the case with LAS files used for LiDAR data. The files get created, but you won’t see anything new in your QGIS working session.
For all the other types of output, you will find a checkbox that you can use to tell the algorithm whether to load the file once it is generated by the algorithm or not. By default, all files are opened.
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).
Como foi mencionado, o menu de configuração dá acesso a um novo diálogo onde pode configurar a forma como o algoritmo trabalha. Os parâmetros de configuração são estruturados em blocos separados que podem ser seleccionados no lado esquerdo do diálogo.
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 SEXTANTE and added to the QGIS canvas, it will be rendered with that style.
Os estilos de renderização podem ser configurados individualmente para cada algoritmo e cada um para os seus ficheiros de saída. Apenas clique com o direito do rato no nome do algoritmo na caixa de ferramentas e seleccione Editar estilos de renderização. Irá ver um diálogo como o que é exibido a seguir.
Figure Processing 16:
Seleccione o ficheiro de estilo (.qml) que quer para cada ficheiro de saída e pressione [OK].
Os outros parâmetros de configuração no grupo Geral estão em baixo referidos:
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.