.

クエリビルダー

クエリビルダーはSQLのWHERE句を使用してテーブルのサブセットを定義し、メインウィンドウに結果を表示することを可能とします。そのクエリ結果は、新しいベクタレイヤとして保存することができます。

クエリ

レイヤプロパティを開いて 一般情報 タブを選択し ** クエリビルダ ** を開いて下さい. 地物サブセット の下の [Query Builder] ボタンをクリックすると クエリビルダ を開けます. たとえば TYPE_2 フィールドを持つ regions レイヤがある場合クエリビルダの Provider specific filter expression ボックスで borough の領域のみ選択することができます. Figure_attributes_2 shows では QGIS サンプルデータの regions.shp layer でQueryビルダが計算した例を表示しています. フィールド、値と演算子セクションではユーザがSQLに似たクエリを作成する手助けを行います.

Figure Attributes 2:

../../../_images/queryBuilder.png

クエリビルダー nix

The Fields list contains all attribute columns of the attribute table to be searched. To add an attribute column to the SQL WHERE clause field, double click its name in the Fields list. Generally, you can use the various fields, values and operators to construct the query, or you can just type it into the SQL box.

The Values list lists the values of an attribute table. To list all possible values of an attribute, select the attribute in the Fields list and click the [all] button. To list the first 25 unique values of an attribute column, select the attribute column in the Fields list and click the [Sample] button. To add a value to the SQL WHERE clause field, double click its name in the Values list.

The Operators section contains all usable operators. To add an operator to the SQL WHERE clause field, click the appropriate button. Relational operators ( = , > , ...), string comparison operator (LIKE), and logical operators (AND, OR, ...) are available.

The [Test] button shows a message box with the number of features satisfying the current query, which is useful in the process of query construction. The [Clear] button clears the text in the SQL WHERE clause text field. The [OK] button closes the window and selects the features satisfying the query. The [Cancel] button closes the window without changing the current selection.

QGIS treats the resulting subset acts as if it where the entire layer. For example if you applied the filter above for ‘Borough’, you can not display, query, save or edit Ankorage, because that is a ‘Manicpality’ and therefore not part of the subset.

唯一の例外は、あなたのレイヤはデータベースの一部である場合を除き、サブセットを使用してレイヤを編集することができなくなるでしょうということです。