Outdated version of the documentation. Find the latest one here.

` `

Интерфейс пакетной обработки

Введение

All algorithms (including models) can be executed as a batch process. That is, they can be executed using not just a single set of inputs, but several of them, executing the algorithm as many times as needed. This is useful when processing large amounts of data, since it is not necessary to launch the algorithm many times from the toolbox.

Чтобы запустить алгоритм в режиме пакетной обработки выделите его в панели инструментов, вызовите контекстное меню и выберите пункт Execute as batch process.

../../../_images/batch_processing_right_click.png

Batch Processing from right-click

If you have the execution dialog of the algorithm open, you can also start the batch processing interface from there, clicking on the Run as batch process... button.

../../../_images/batch_processing_params_dialog.png

Batch Processing From Algorithm Dialog

Таблица параметров

Запуск пакетной обработки во многом схож с выполнением единичной операции. Отличие лишь в том, что параметры теперь задаются для каждой итерации обработки. Диалог настройки в этом случае принимает вид таблицы.

../../../_images/batch_processing.png

Batch Processing

Каждая строка таблицы соответствует одному запуску алгоритма, в ячейках находятся параметры. Это похоже на обычный диалог настройки алгоритмов, только используется другое расположение элементов.

По умолчанию в таблице три строки, при необходимости добавить или удалить строки можно при помощи кнопок внизу окна.

После того, как размер таблицы (число строк в ней) задан, можно приступать к её заполнению.

Заполнение таблицы параметров

For most parameters, setting the value is trivial. Just type the value or select it from the list of available options, depending on the parameter type.

Filenames for input data objects are introduced directly typing or, more conveniently, clicking on the browseButton button on the right hand of the cell, which will show a context menu with two option: one for selecting from the layers currently opened and another to select from the filesystem. This second option, when selected, shows a typical file chooser dialog. Multiple files can be selected at once. If the input parameter represents a single data object and several files are selected, each one of them will be put in a separate row, adding new ones if needed. If the parameter represents a multiple input, all the selected files will be added to a single cell, separated by semicolons (;).

Layer identifiers can be directly typed in the parameter text box. You can enter the full path to a file or the name of a layer that is currently loaded in the current QGIS project. The name of the layer will be automatically resolved to its source path. Notice that, if several layers have the same name, this might cause unexpected results due to ambiguity.

Output data objects are always saved to a file and, unlike when executing an algorithm from the toolbox, saving to a temporary file or database is not permitted. You can type the name directly or use the file chooser dialog that appears when clicking on the accompanying button.

После выбора выходного файла появится ещё один диалог, позволяющий автоматически заполнить остальные ячейки.

../../../_images/batch_processing_save.png

Диалог автозаполнения

Если выбрано значение Do not autofill (по умолчанию), в заданную ячейку будет просто вставлено выбранное имя файла. Если же выбрано любое другое значение, будут заполнены все ячейки. При этом имена файлов будут сформированы на основе указаного критерия автозаполнения. Такой подход значительно ускоряет заполнение таблицы параметров пакетной обработки.

Automatic filling can be done by simply adding correlative numbers to the selected file path, or by appending the value of another field at the same row. This is particularly useful for naming output data objects according to input ones.

../../../_images/batch_processing_filepath.png

Batch Processing File Path

Выполнение пакетной обработки

To execute the batch process once you have introduced all the necessary values, just click on [OK]. Progress of the global batch task will be shown in the progress bar in the lower part of the dialog.