.

バッチプロセシングインタフェース

はじめに

すべてのアルゴリズム(モデルを含む)はバッチプロセスとして実行することができます.すなわち,それらは単一の入力のセットではなく,それらのいくつかを使用して実行でき,必要に応じて何度でもアルゴリズムを実行できます.大量のデータを処理する際には,ツールボックスからアルゴリズムを何回も起動する必要がないので,これは有用です.

アルゴリズムをバッチプロセスとして実行する場合ツールボックスの名前を右ボタンクリックして表示されるポップアップメニューで Execute as batch process を選択して下さい

Figure Processing 26:

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

Batch Processing Right Click win

パラメータテーブル

バッチプロセスの実行は、アルゴリズムの単純な実行と類似しています。パラメータ値を定義しなければならないが、この場合は、各パラメータに単一の値を設定する必要はありません。値は次に示すようなテーブルを使って紹介しています。

Figure Processing 27:

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

Batch Processing win

このテーブルの各行はアルゴリズム単一の実行を表し、各セルはパラメータの1つを含みます。これはツールボックスからアルゴリズムを実行する際に表示されるパラメータダイアログと類似しており、配列が異なっています。

デフォルトではテーブルhは2行のみ含んでいます。ウィンドウの下部にあるボタンを使って、行の追加や削除ができます。

テーブルのサイズが設定されると適切な値で埋められます.

パラメータテーブルの入力

たいていのパラメータで,その値を設定するのは些細なことです.値を直接入力するか,パラメータタイプに応じて,利用可能なオプションのリストから選択するだけです.

The main differences are found for parameters representing layers or tables, and for output file paths. Regarding input layers and tables, when an algorithm is executed as part of a batch process, those input data objects are taken directly from files, and not from the set of them already opened in QGIS. For this reason, any algorithm can be executed as a batch process, even if no data objects at all are opened and the algorithm cannot be run from the toolbox.

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 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 (;).

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

いったんファイルを選択すると、新しいダイアログが同じ列(同じパラメータ)内の他のセルの自動補完を行うために表示されます。

Figure Processing 28:

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

バッチプロセッシング保存

もしデフォルトの値 (‘自動補完しない’) が選ばれた場合は、パラメータテーブルから選択されたセルの中の選択されたファイル名が選ばれます。もし、その他のオプションが選ばれた場合は、以下の選択された全てのセルは定義された条件に基づいて自動的に入力されます。この方法は、テーブルを埋めるよりはるかに簡単で、バッチプロセスは最小の労力によって定義することが出来ます。

自動入力は、単に選択したファイルパスに相関的な番号を追加するか、同じ行で別のフィールドの値を追加して行うことができます。これは、入力されたものに応じて出力データオブジェクトを命名するのに特に役立ちます。

Figure Processing 29:

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

Batch Processing File Path win

バッチプロセスの実行

いったん必要な値を導入しバッチプロセスを実行するためには **[OK]**をクリックするだけです。バッチタスク全体の進捗はダイアログの下部にあるプログレスバーで表示されます。