重要
翻訳は あなたが参加できる コミュニティの取り組みです。このページは現在 66.67% 翻訳されています。
17.12. 範囲を定義する
注釈
このレッスンでは、いくつかのアルゴリズムによって必要とされている範囲、特にラスタの範囲を定義する方法について説明します。
いくつかのアルゴリズムは、それらが行う解析によってカバーされる区域を定義する範囲、そしてたいていは結果のレイヤの区域を定義する範囲を必要とします。
範囲が必要とされる場合は、それを定義する4つの値(最小X、最小Y、最大X、最大Y)を入力することによって手動で定義できますが、他にもそれを同様に行うより実用的でより興味深い方法があります。このレッスンではそれらのすべてを見ることができます。
First, let's open an algorithm that requires an extent to be defined. Open the Rasterize (vector to raster) algorithm, which creates a raster layer from a vector layer.
最後の2つのパラメータを除くすべてのパラメータは、ラスタ化するレイヤを定義し、ラスタ化処理の方法を設定するために使用されます。一方、最後の2つのパラメータは、出力レイヤの特性を定義するものです。つまり、カバーする区域(入力ベクタレイヤがカバーする区域と同じとは限らない)と、解像度/セルサイズ(ベクタレイヤにはセルサイズがないため、ベクタレイヤから推測することはできない)を定義する。
まず行うことができることは、前に説明した定義する4つの値を、カンマで区切って入力することです。
それは余分な説明を必要としません。これは最も柔軟なオプションですが、場合によってはあまり実用的でないこともあり、それが他のオプションが実装されている理由です。それらにアクセスするには、範囲テキストボックスの右側のボタンをクリックする必要があります。
それらのそれぞれが何をするか見てみましょう。
The first option is Use layer/canvas extent, which will show the selection dialog shown below.
ここでは、キャンバスの範囲(現在のズームでカバーされている範囲)、または利用可能ないずれかのレイヤの範囲を選択できます。それを選択して OK をクリックすると、テキストボックスが自動的に対応する値で満たされます。
The second option is Select extent on canvas. In this case, the algorithm dialog disappears and you can click and drag on the QGIS canvas to define the desired extent.
マウスボタンを放すとダイアログが再び現れ、そのテキストボックスには定義された範囲に対応する値がすでに入っています。
The last option is Use min covering extent from input layers, which is the default option. This will compute the min covering extent of all layers used to run the algorithm, and there is no need to enter any value in the text box. In the case of a single input layer, as in the algorithm we are running, the same extent can be obtained by selecting that same input layer in the Use layer/canvas extent that we already saw. However, when there are several input layers, the min covering extent does not correspond to any of the input layer extent, since it is computed from all of them together.
ラスタ化アルゴリズムを実行するために、この最後のメソッドを使用します。
Fill the parameters dialog as shown next, and press OK.
注釈
In this case, better use an Integer (1 byte) instead of a
Floating point (4 byte), since the NAME is an integer with maximum
value=64. This will result in a smaller file size and faster computations.
元のベクタレイヤがカバーする区域を正確にカバーするラスタ化レイヤが得られるでしょう。
In some cases, the last option, Use min covering extent from input layers, might not be available. This will happen in those algorithm that do not have input layers, but just parameters of other types. In that case, you will have to enter the value manually or use any of the other options.
選択が存在する場合、レイヤの範囲は地物の全体集合のことであり、たとえラスタ化が選択された項目に対してのみ実行されても、選択は範囲を計算するために使用されませんのでご注意ください。その場合は、実際に選択から新しいレイヤを作成しそれを入力として使用したいかもしれません。