Importante

Translation is a community effort you can join. This page is currently translated at 57.14%.

17.9. O log do processamento

Nota

Esta lição descreve o log de processamento.

All the analysis performed with the processing framework is logged in QGIS logging system. This allows you to know more about what has been done with the processing tools, to solve problems when they happen, and also to re–run previous operations, since the logging system also implements some interactivity.

To open the log, click on the balloon at the bottom right, on the QGIS status bar. Some algorithms might leave here information about their execution. For instance, those algorithms that call an external application usually log the console output of that application to this entry. If you have a look at it, you will see that the output of the SAGA algorithm that we just run (and that fail to execute because input data was not correct) is stored here.

Isso é útil para entender o que está acontecendo. Os usuários avançados serão capazes de analisar a saída para descobrir por que o algoritmo falhou. Se você não for um usuário avançado, isso vai ser útil para outras pessoas para ajudá-lo a diagnosticar o problema que você tem, que pode ser um problema na instalação do software externo ou um problema com os dados que você forneceu.

Even if the algorithm could be executed, some algorithms might leave warnings in case the result might not be right. For instance, when executing an interpolation algorithm with a very small amount of points, the algorithm can run and will produce a result, but it is likely that it will not be correct, since more points should be used. It’s a good idea to regularly check for this type of warnings if you are not sure about some aspect of a given algorithm.

From the Processing menu, under the History section, you’ll find Algorithms. All algorithms that are executed, even if they are executed from the GUI and not from the console (which will be explained later in this manual) are stored in this section as a console call. That means that everytime you run an algorithm, a console command is added to the log, and you have the full history of your working session. Here is how that history looks like:

../../../_images/history1.png

Isto pode ser muito útil quando começar a trabalhar com a console, para aprender sobre a sintaxe dos algoritmos. Vamos usá-lo quando discutirmos como executar comandos de análise a partir da console.

A história também é interativa e você pode reexecutar qualquer algoritmo anterior apenas com um duplo clique em sua entrada. Esta é uma maneira fácil de replicar o trabalho que fizemos antes.

Por exemplo, tente o seguinte: abra os dados correspondentes ao primeiro capítulo deste manual e execute o algoritmo explicado lá; agora vá para a janela de log e localize o último algoritmo na lista, que corresponde ao algoritmo que acabou de ser executado; dê um duplo clique sobre ele e um um novo resultado deve ser produzido, assim como quando você executou-o usando a caixa de diálogo normal e chamando-o a partir da caixa de ferramentas.

17.9.1. hard Avançado

Você também pode modificar o algoritmo. Apenas copie-o, abra a Complementos ► Python console, clique em Importar classe ► Importar Classe de Processamento e cole-o para executar novamente a análise; mude o texto à vontade. Para exibir o arquivo resultante, digite iface.addVectorLayer('/path/filename.shp', 'Nome da camada na legenda', 'ogr'). Caso contrário, você pode usar processing.runandload.