Importante

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

17.18. Modelos más complejos

Nota

In this lesson we will work with a more complex model in the model designer.

The first model that we created in the previous chapter was a very simple one, with just one input and three algorithms. More complex models can be created, with different types of inputs and containing more steps. For this chapter we will work with a model that creates a vector layer with watersheds, based on a DEM and a threshold value. That will be very useful for calculating several vector layers corresponding to different thresholds, without having to repeat each single step each time.

Esta lição não contém instruções sobre como criar seu modelo. Você já conhece os passos necessários (nós os vimos em uma a lição anterior) e já viu as idéias básicas sobre o modelador, então você mesmo deve experimentá-lo. Passe alguns minutos tentando criar seu modelo, e não se preocupe em cometer erros. Lembre-se: primeiro adicione os inputs e depois os algoritmos que os utilizam para criar o fluxo de trabalho.

Nota

En caso de que no pudiera crear el modelo completo usted mismo y necesitará un poco de ayuda extra, la carpeta de datos correspondiente a esta lección contiene una versión ‘casi’ terminada de la misma. Abra el modelador y a continuación abra el archivo del modelo que encontrará en la carpeta de datos. Debería ver algo como esto.

../../../_images/model1.png

This model contains all the steps needed to complete the calculation, but it just has one input: the DEM. That means that the threshold for channel definition uses a fixed value, which makes the model not as useful as it could be. That is not a problem, since we can edit the model, and that is exactly what we will do.

  1. Primeiro, vamos adicionar uma entrada numérica. Isso irá pedir ao usuário uma entrada numérica que podemos usar quando tal valor for necessário em qualquer um dos algoritmos incluídos em nosso modelo.

  2. Click on the Number entry in the Inputs tree, and you will see the corresponding dialog.

  3. Preencha com os seguintes valores.

    • Parameter name: Threshold for channel definition

    • Valor padrão: 1.000.000

    ../../../_images/threshold.png

    Ahora su modelo debería tener este aspecto.

    ../../../_images/model_with_threshold.png

    A entrada que acabamos de acrescentar não é utilizada, portanto o modelo não mudou realmente. Temos que ligar essa entrada ao algoritmo que a utiliza, neste caso a rede Canal. Para editar um algoritmo que já existe no modelador, basta clicar sobre o ícone da caneta na caixa correspondente na tela.

  4. Clique no algoritmo Rede de canais e você verá algo como isto.

    ../../../_images/channel_network.png

    The dialog is filled with the current values used by the algorithm. You can see that the Initiation threshold parameter has a fixed value of 1,000,000 (this is also the default value of the algorithm, but any other value could be put in there). However, you might notice that the parameter is not entered in a common text box, but in a drop-down menu.

  5. Desdobre o menu de parâmetros limitantes e você verá algo parecido com isto.

    ../../../_images/unfolded.png

    La entrada que hemos añadido esta allí y podemos seleccionarlo. Cada vez que un algoritmo en un modelo requiere un valor numérico, que puede codificar y directamente escribirla, o puede usar cualquiera de las entradas disponibles y los valores (recuerde que algunos algoritmos generan valores numéricos sencillos.Veremos más sobre esto pronto). En el caso de un parámetro de texto, también se verá entradas de texto y se podrá seleccionar una de ellos o escribir el valor fijo deseado.

  6. Select the Threshold for channel definition input in the Initiation threshold parameter.

  7. Clique em OK para aplicar as mudanças ao seu modelo. Agora o design do modelo deve ser parecido com este.

    ../../../_images/model_linked_parameter.png
  8. O modelo está completo agora. Execute-o usando o MDE que usamos nas lições anteriores, e com diferentes valores limitantes.

    Below you have a sample of the result obtained for different values. You can compare with the result for the default value, which is the one we obtained in the hydrological analysis lesson.

    ../../../_images/result_1.png

    Fig. 17.27 Umbral = 100,000

    ../../../_images/result_2.png

    Fig. 17.28 Umbral = 1,0000,000