ベクタ一般

Assign projection

Assigns a new projection to a vector layer.

これが作成するのは、入力されたものとまったく同じ地物とジオメトリを持つ新しいレイヤですが、新しいCRSに割り当てられています。ジオメトリは再投影 されません 。異なるCRSに割り当てられるだけです。

このアルゴリズムは、誤った投影法が割り当てられたレイヤーを修復するために使用できます。

このアルゴリズムでは属性は変更されません。

Parameters

Label

Name

Type

Description

Input layer

INPUT

[vector: any]

Vector layer with wrong or missing CRS

Assigned CRS

CRS

[crs]

Default: EPSG:4326 - WGS84

Select the new CRS to assign to the vector layer

Assigned CRS

(Optional)

OUTPUT

[same as input]

Default: [Create temporary layer]

Specify the output layer containing only the duplicates. One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

Assigned CRS

OUTPUT

[same as input]

Vector layer with assigned projection

仮想ベクタの作成

複数のベクタレイヤを含む仮想ベクタレイヤを作成します。出力の仮想ベクタレイヤは現在のプロジェクトでは開きません。

このアルゴリズムは、他のアルゴリズムが複数のレイヤを必要としているが、レイヤが指定されている1つの vrt だけを受け入れる場合に特に便利です。

Parameters

Label

Name

Type

Description

Input datasources

INPUT

[vector: any] [list]

Select the vector layers you want to use to build the virtual vector

Create "unioned" VRT

UNIONED

[boolean]

Default: False

Check if you want to unite all the vectors in a single vrt file

Virtual vector

OUTPUT

[same as input]

Default: [Save to temporary file]

Specify the output layer containing only the duplicates. One of:

  • Save to a Temporary File

  • Save to File...

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

Virtual vector

OUTPUT

[vector: any]

The output virtual vector made from the chosen sources

Create attribute index

照会を高速化するために、属性テーブルのフィールドに対して索引を作成します。索引作成のサポートは、レイヤのデータプロバイダとフィールドタイプの両方によって異なります。

No outputs are created: the index is stored on the layer itself.

Parameters

Label

Name

Type

Description

Input Layer

INPUT

[vector: any]

Select the vector layer you want to create an attribute index for

Attribute to index

FIELD

[tablefield: any]

Field of the vector layer

Outputs

Label

Name

Type

Description

Indexed layer

OUTPUT

[same as input]

A copy of the input vector layer with an index for the specified field

Create spatial index

空間的な位置に基づいてレイヤ内の地物へのアクセスを高速化するためのインデックスを作成します。空間インデックス作成のサポートは、レイヤのデータプロバイダによって異なります。

No new output layers are created.

Default menu: Vector ‣ Data Management Tools

Parameters

Label

Name

Type

Description

Input Layer

INPUT

[vector: any]

Input vector layer

Outputs

Label

Name

Type

Description

Indexed layer

OUTPUT

[same as input]

A copy of the input vector layer with a spatial index

Define layer projection

提供されたCRSに既存のレイヤの投影法を設定します。レイヤに proj ファイルがなくて正しい投影法を知っているときにとても便利です。

Contrary to the Assign projection algorithm, it modifies the current layer and will not output a new layer.

注釈

For Shapefile datasets, the .prj and .qpj files will be overwritten - or created if missing - to match the provided CRS.

Default menu: Vector ‣ Data Management Tools

Parameters

Label

Name

Type

Description

Input layer

INPUT

[vector: any]

Vector layer with missing projection information

CRS

CRS

[crs]

Select the CRS to assign to the vector layer

Outputs

Label

Name

Type

Description

INPUT

[same as input]

The input vector layer with the defined projection

Delete duplicate geometries

Finds and removes duplicated geometries.

属性はチェックされません。そのため、属性は違っても同じジオメトリを持つ地物は、一つしか出力されません。

Parameters

Label

Name

Type

Description

Input layer

INPUT

[vector: any]

The layer with duplicate geometries you want to clean

Cleaned

OUTPUT

[same as input]

Default: [Create temporary layer]

Specify the output layer. One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

Count of discarded duplicate records

DUPLICATE_COUNT

[number]

Count of discarded duplicate records

Cleaned

OUTPUT

[same as input]

The output layer without any duplicated geometries

Count of retained records

RETAINED_COUNT

[number]

Count of unique records

Drop geometries

入力レイヤ属性テーブルの単純な ジオメトリのない コピーを作成します。ソースレイヤの属性テーブルを保持します。

If the file is saved in a local folder, you can choose between many file formats.

checkbox Allows features in-place modification

Parameters

Label

Name

Type

Description

Input layer

INPUT

[vector: any]

The input vector layer

Dropped geometries

OUTPUT

[table]

Specify the output geometryless layer. One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

Dropped geometries

OUTPUT

[table]

The output geometryless layer. A copy of the original attribute table.

Execute SQL

Runs a simple or complex query with SQL syntax on the source layer.

The result of the query will be added as a new layer.

Parameters

Label

Name

Type

Description

Additional input datasources (called input1, .., inputN in the query)

INPUT_DATASOURCES

[vector: any] [list]

問い合わせるレイヤのリスト。 SQLエディタでは、これらのレイヤを実際の名前でも参照できますし、選択したレイヤ数に応じて input1input2inputN でも参照できます。

SQL query

INPUT_QUERY

[string]

Type the string of your SQL query, e.g. SELECT * FROM input1.

Unique identifier field

Optional

INPUT_UID_FIELD

[string]

Specify the column with unique ID

Geometry field

Optional

INPUT_GEOMETRY_FIELD

[string]

Specify the geometry field

Geometry type

Optional

INPUT_GEOMETRY_TYPE

[enumeration]

Default: 0

Choose the geometry of the result. By default the algorithm will autodetect it. One of:

  • 0 --- Autodetect

  • 1 --- No geometry

  • 2 --- Point

  • 3 --- LineString

  • 4 --- Polygon

  • 5 --- MultiPoint

  • 6 --- MultiLineString

  • 7 --- MultiPolygon

CRS

Optional

INPUT_GEOMETRY_CRS

[crs]

The CRS to assign to the output layer

SQL Output

OUTPUT

[vector: any]

Default: [Create temporary layer]

Specify the output layer created by the query. One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

SQL Output

OUTPUT

[vector: any]

Vector layer created by the query

Extract selected features

Saves the selected features as a new layer.

注釈

If the selected layer has no selected features, the newly created layer will be empty.

Parameters

Label

Name

Type

Description

Input Layer

INPUT

[vector: any]

Layer to save the selection from

Selected features

OUTPUT

[same as input]

Default: [Create temporary layer]

Specify the vector layer for the selected features. One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

Selected features

OUTPUT

[same as input]

Vector layer with only the selected features, or no feature if none was selected.

Find projection

Creates a shortlist of candidate coordinate reference systems, for instance for a layer with an unknown projection.

The area that the layer is expected to cover must be specified via the target area parameter. The coordinate reference system for this target area must be known to QGIS.

The algorithm operates by testing the layer's extent in every known reference system and then listing any for which the bounds would be near the target area if the layer was in this projection.

Parameters

Label

Name

Type

Description

Input Layer

INPUT

[vector: any]

Layer with unknown projection

Target area for layer (xmin, xmax, ymin, ymax)

TARGET_AREA

[extent]

The area that the layer covers. The options for specifying the extent are:

  • Use Canvas Extent

  • Select Extent on Canvas

  • Use Layer Extent

It is also possible to provide the extent coordinates directly (xmin, xmax, ymin, ymax).

CRS candidates

OUTPUT

[table]

Default: [Create temporary layer]

Specify the table (geometryless layer) for the CRS suggestions (EPSG codes). One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

CRS candidates

OUTPUT

[table]

A table with all the CRS (EPSG codes) of the matching criteria.

Join attributes by field value

Takes an input vector layer and creates a new vector layer that is an extended version of the input one, with additional attributes in its attribute table.

追加の属性とその値は、2番目のベクトルレイヤから取得されます。結合基準を定義するために、それぞれで属性が選択されます。

Parameters

Label

Name

Type

Description

Input Layer

INPUT

[vector: any]

Input vector layer. The output layer will consist of the features of this layer with attributes from matching features in the second layer.

Table field

FIELD

[tablefield: any]

Field of the source layer to use for the join

Input layer 2

INPUT_2

[vector: any]

Layer with the attribute table to join

Table field 2

FIELD_2

[tablefield: any]

Field of the second (join) layer to use for the join The type of the field must be equal to (or compatible with) the input table field type.

Layer 2 fields to copy

Optional

FIELDS_TO_COPY

[tablefield: any] [list]

Select the specific fields you want to add. By default all the fields are added.

Join type

METHOD

[enumeration]

Default: 1

The type of the final joined layer. One of:

  • 0 --- Create separate feature for each matching feature (one-to-many)

  • 1 --- Take attributes of the first matching feature only (one-to-one)

Discard records which could not be joined

DISCARD_NONMATCHING

[boolean]

Default: True

Check if you don't want to keep the features that could not be joined

Joined field prefix

Optional

PREFIX

[string]

Add a prefix to joined fields in order to easily identify them and avoid field name collision

Joined layer

OUTPUT

[same as input]

Default: [Create temporary layer]

Specify the output vector layer for the join. One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Unjoinable features from first layer

NON_MATCHING

[same as input]

Default: [Skip output]

Specify the output vector layer for unjoinable features from first layer. One of:

  • Skip output

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

Number of joined features from input table

JOINED_COUNT

[number]

Unjoinable features from first layer

Optional

NON_MATCHING

[same as input]

Vector layer with the non-matched features

Joined layer

OUTPUT

[same as input]

Output vector layer with added attributes from the join

Number of unjoinable features from input table

Optional

UNJOINABLE_COUNT

[number]

Join attributes by location

Takes an input vector layer and creates a new vector layer that is an extended version of the input one, with additional attributes in its attribute table.

追加の属性とその値は、第2のベクタレイヤから取得されます。第1のレイヤからの各地物に追加される第2のレイヤからの値を選択するために空間的基準が適用されます。

Default menu: Vector ‣ Data Management Tools

Parameters

Label

Name

Type

Description

Input Layer

INPUT

[vector: any]

Input vector layer. The output layer will consist of the features of this layer with attributes from matching features in the second layer.

Join layer

JOIN

[vector: any]

The attributes of this vector layer will be added to the source layer attribute table.

Geometric predicate

PREDICATE

[enumeration] [list]

Default: [0]

Select the geometric criteria. One or more of:

  • 0 --- intersects

  • 1 --- contains

  • 2 --- equals

  • 3 --- touches

  • 4 --- overlaps

  • 5 --- within

  • 6 --- crosses

Fields to add (leave empty to use all fields)

Optional

JOIN_FIELDS

[tablefield: any] [list]

Select the specific fields you want to add. By default all the fields are added.

Join type

METHOD

[enumeration]

The type of the final joined layer. One of:

  • 0 --- Create separate feature for each matching feature (one-to-many)

  • 1 --- Take attributes of the first matching feature only (one-to-one)

Discard records which could not be joined

DISCARD_NONMATCHING

[boolean]

Default: False

Remove from the output the input layer records which could not be joined

Joined field prefix

Optional

PREFIX

[string]

Add a prefix to joined fields in order to easily identify them and avoid field name collision

Joined layer

OUTPUT

[same as input]

Default: [Create temporary layer]

Specify the output vector layer for the join. One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Unjoinable features from first layer

NON_MATCHING

[same as input]

Default: [Skip output]

Specify the output vector layer for unjoinable features from first layer. One of:

  • Skip output

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

Number of joined features from input table

JOINED_COUNT

[number]

Unjoinable features from first layer

Optional

NON_MATCHING

[same as input]

Vector layer of the non-matched features

Joined layer

OUTPUT

[same as input]

Output vector layer with added attributes from the join

Join attributes by location (summary)

Takes an input vector layer and creates a new vector layer that is an extended version of the input one, with additional attributes in its attribute table.

追加の属性とその値は、第2のベクタレイヤから取得されます。第1のレイヤからの各地物に追加される第2のレイヤからの値を選択するために空間的基準が適用されます。

The algorithm calculates a statistical summary for the values from matching features in the second layer (e.g. maximum value, mean value, etc).

Parameters

Label

Name

Type

Description

Input Layer

INPUT

[vector: any]

Input vector layer. The output layer will consist of the features of this layer with attributes from matching features in the second layer.

Join layer

JOIN

[vector: any]

The attributes of this vector layer will be added to the source layer attribute table.

Geometric predicate

PREDICATE

[enumeration] [list]

Default: [0]

Select the geometric criteria. One or more of:

  • 0 --- intersects

  • 1 --- contains

  • 2 --- equals

  • 3 --- touches

  • 4 --- overlaps

  • 5 --- within

  • 6 --- crosses

Fields to summarize (leave empty to use all fields)

Optional

JOIN_FIELDS

[tablefield: any] [list]

Select the specific fields you want to add and summarize. By default all the fields are added.

Summaries to calculate (leave empty to use all fields)

Optional

SUMMARIES

[enumeration] [list]

Default: []

Choose which type of summary you want to add to each field and for each feature. One or more of:

  • 0 --- count

  • 1 --- unique

  • 2 --- min

  • 3 --- max

  • 4 --- range

  • 5 --- sum

  • 6 --- mean

  • 7 --- median

  • 8 --- stddev

  • 9 --- minority

  • 10 --- majority

  • 11 --- q1

  • 12 --- q3

  • 13 --- iqr

  • 14 --- empty

  • 15 --- filled

  • 16 --- min_length

  • 17 --- max_length

  • 18 --- mean_length

Discard records which could not be joined

DISCARD_NONMATCHING

[boolean]

Default: False

Remove from the output the input layer records which could not be joined

Joined layer

OUTPUT

[same as input]

Default: [Create temporary layer]

Specify the output vector layer for the join. One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

Joined layer

OUTPUT

[same as input]

Output vector layer with summarized attributes from the join

Merge vector layers

Combines multiple vector layers of the same geometry type into a single one.

If attributes tables are different, the attribute table of the resulting layer will contain the attributes from all input layers. Non-matching fields will be appended at the end of the attribute table.

If any input layers contain Z or M values, then the output layer will also contain these values. Similarly, if any of the input layers are multi-part, the output layer will also be a multi-part layer.

任意で、併合されるレイヤの目的座標参照系(CRS)を設定できます。設定されていない場合、CRSは最初の入力レイヤから取得されます。すべてのレイヤがこのCRSと一致するように再投影されます。

../../../../_images/merge_vector_layers.png

Default menu: Vector ‣ Data Management Tools

Parameters

Label

Name

Type

Description

Input Layers

LAYERS

[vector: any] [list]

The layers that are to be merged into a single layer. Layers should be of the same geometry type.

Destination CRS

Optional

CRS

[crs]

Choose the CRS for the output layer. If not specified, the CRS of the first input layer is used.

Merged

OUTPUT

[same as input]

Default: [Create temporary layer]

Specify the output vector layer. One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

Merged

OUTPUT

[same as input]

Output vector layer containing all the features and attributes from the input layers.

Order by expression

式に従ってベクタレイヤをソートします:式に従って地物インデックスを変更します。

期待通りに機能しない可能性がありますので注意して下さい。順序が毎回維持されない場合があります。

Parameters

Label

Name

Type

Description

Input Layer

INPUT

[vector: any]

Input vector layer to sort

Expression

EXPRESSION

[expression]

Expression to use for the sorting

Sort ascending

ASCENDING

[boolean]

Default: True

If checked the vector layer will be sorted from small to large values.

Sort nulls first

NULLS_FIRST

[boolean]

Default: False

If checked, Null values are placed first

Ordered

OUTPUT

[same as input]

Default: [Create temporary layer]

Specify the output vector layer. One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

Ordered

OUTPUT

[same as input]

Output (sorted) vector layer

Reproject layer

Reprojects a vector layer in a different CRS. The reprojected layer will have the same features and attributes of the input layer.

checkbox Allows features in-place modification

Parameters

Label

Name

Type

Description

Input Layer

INPUT

[vector: any]

Input vector layer to reproject

Target CRS

TARGET_CRS

[crs]

Default: EPSG:4326 - WGS 84

Destination coordinate reference system

Reprojected

OUTPUT

[same as input]

Default: [Create temporary layer]

Specify the output vector layer. One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File...

  • Save to Geopackage...

  • Save to PostGIS Table

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

Reprojected

OUTPUT

[same as input]

Output (reprojected) vector layer

Set style for vector layer

Sets the style of a vector layer. The style must be defined in a QML file.

No new output are created: the style is immediately assigned to the vector layer.

Parameters

Label

Name

Type

Description

Input Layer

INPUT

[vector: any]

Input vector layer you want to set the style for

Style file

STYLE

[file]

qml file of the style

Outputs

Label

Name

Type

Description

Input Layer

INPUT

[same as input]

The input vector layer with the new style

Split vector layer

Creates a set of vectors in an output folder based on an input layer and an attribute. The output folder will contain as many layers as the unique values found in the desired field.

The number of files generated is equal to the number of different values found for the specified attribute.

It is the opposite operation of merging.

Default menu: Vector ‣ Data Management Tools

Parameters

Label

Name

Type

Description

Input Layer

INPUT

[vector: any]

Input vector layer

Unique ID field

FIELD

[tablefield: any]

Field to use for splitting

Output directory

OUTPUT

[folder]

Default: [Save to temporary folder]

Specify the directory for the output layers. One of:

  • Save to a Temporary Directory

  • Save to Directory...

The file encoding can also be changed here.

Outputs

Label

Name

Type

Description

Output directory

OUTPUT

[folder]

The directory for the output layers

Output layers

OUTPUT_LAYERS

[same as input] [list]

The output vector layers resulting from the split.

Truncate table

Truncates a layer, by deleting all features from within the layer.

警告

This algorithm modifies the layer in place, and deleted features cannot be restored!

Parameters

Label

Name

Type

Description

Input Layer

INPUT

[vector: any]

Input vector layer

Outputs

Label

Name

Type

Description

Truncated layer

OUTPUT

[folder]

The truncated (empty) layer