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

` `

Vector general

Delete duplicate geometries

Описание

<put algorithm description here>

Параметри

Input layer [vector: any]
<put parameter description here>

Изходни резултати

Output [vector]
<put output description here>

Console usage

processing.runalg('qgis:deleteduplicategeometries', input, output)

See also

Execute SQL

Описание

This algorithm allows to execute an SQL query on a set of input vector layers thanks to the virtual layer provider.

Параметри

Input layer [vector: any]
<put parameter description here>
Additional data sources [vector]
Data sources that have to be loaded for reference in the SQL query. Any layer already loaded in QGIS is available in the query through its name or id. But for use of this algorithm in a script, input sources should be set here. Each input data source can be referred to as input1 ... inputN as layer names in the query.
Query [string]
The SQL query. SQLite, Spatialite and QGIS expression functions can be used here.
Unique identifier field [string]
Optional parameter to specify which field of the query should be used as a unique id.
Geometry field [string]
Optional parameter to specify which field should be considered as the geometry field, if one wants to avoid possibly slow autodetection.
Geometry type [selection]
Optional parameter to specify the type of the geometry if one wants to avoid possibly slow autodetection.

Geometry types:

  • 0 — Autodetect
  • 1 — NoGeometry
  • 2 — Point
  • 3 — LineString
  • 4 — Polygon
  • 5 — MultiPoint
  • 6 — MultiLineString
  • 7 — MultiPolygon
Geometry CRS [crs]
Optional parameter to specify the coordinate system of the geometry if one wants to avoid possibly slow autodetection.

Изходни резултати

Output [vector]
Output vector

Console usage

processing.runalg('qgis:executesql', inputs, query, uid, geom_field, geom_type, crs)

See also

Свързване на атрибути според местоположение

Описание

<put algorithm description here>

Параметри

Target vector layer [vector: any]
<put parameter description here>
Join vector layer [vector: any]
<put parameter description here>
Geometric predicate [geometrypredicate]

Predicate name or list of predicate names interpreted in an OR like manner.

Possible values: [‘intersects’, ‘contains’, ‘equals’, ‘touches’, ‘overlaps’, ‘within’, ‘crosses’]

Default: []

Attribute summary [selection]

<put parameter description here>

Options:

  • 0 — Take attributes of the first located feature
  • 1 — Take summary of intersecting features

Default: 0

Statistics for summary (comma separated) [string]

Optional.

<put parameter description here>

Default: sum,mean,min,max,median

Joined table [selection]

<put parameter description here>

Options:

  • 0 — Only keep matching records
  • 1 — Keep all records (including non-matching target records)

Default: 0

Изходни резултати

Joined layer [vector]
<put output description here>

Console usage

processing.runalg('qgis:joinattributesbylocation', target, join, predicate, summary, stats, keep, output)

See also

Join attributes table

Описание

<put algorithm description here>

Параметри

Input layer [vector: any]
<put parameter description here>
Input layer 2 [table]
<put parameter description here>
Table field [tablefield: any]
<put parameter description here>
Table field 2 [tablefield: any]
<put parameter description here>

Изходни резултати

Output layer [vector]
<put output description here>

Console usage

processing.runalg('qgis:joinattributestable', input_layer, input_layer_2, table_field, table_field_2, output_layer)

See also

Merge vector layers

Описание

<put algorithm description here>

Параметри

Input layer 1 [vector: any]
<put parameter description here>
Input layer 2 [vector: any]
<put parameter description here>

Изходни резултати

Output [vector]
<put output description here>

Console usage

processing.runalg('qgis:mergevectorlayers', layer1, layer2, output)

See also

Merge datasources in VRT

Описание

This algorithm merge the layers of different data sources in a single vrt file This algorithm is especially useful in case another algorithm needs multiple layers but accept only one vrt in which the layers are specified

Параметри

Input datasources [multipleinput: any vectors]
Input datasources to merge in a single VRT input_datasources is a single string with all path ”;” separated as “path1;path2;....;pathN”
Overwrite output vrt [boolean]

Overwrite VRT if it’s already exist

Default: False

Изходни резултати

Output vrt filename [file]
VRT output filename
Output vrt string [string]
VRT content returned as string

Console usage

processing.runalg('qgis:mergedatasourcesinvrt', input_datasources, input_overwrite_flag, output_vrt_file)

See also

Полигон от пространствен обхват на слой

Описание

<put algorithm description here>

Параметри

Input layer [vector: any]
<put parameter description here>
Calculate extent for each feature separately [boolean]

<put parameter description here>

Default: False

Изходни резултати

Output layer [vector]
<put output description here>

Console usage

processing.runalg('qgis:polygonfromlayerextent', input_layer, by_feature, output)

See also

Reproject layer

Описание

Reprojects a vector layer in a different CRS.

Параметри

Input layer [vector: any]
Layer to reproject.
Target CRS [crs]

Destination coordinate reference system.

Default: EPSG:4326

Изходни резултати

Reprojected layer [vector]
The resulting layer.

Console usage

processing.runalg('qgis:reprojectlayer', input, target_crs, output)

See also

Save selected features

Описание

Saves the selected features as a new layer.

Параметри

Input layer [vector: any]
Layer to process.

Изходни резултати

Output layer with selected features [vector]
The resulting layer.

Console usage

processing.runalg('qgis:saveselectedfeatures', input_layer, output_layer)

See also

Set style for vector layer

Описание

<put algorithm description here>

Параметри

Vector layer [vector: any]
<put parameter description here>
Style file [file]
<put parameter description here>

Изходни резултати

Styled layer [vector]
<put output description here>

Console usage

processing.runalg('qgis:setstyleforvectorlayer', input, style)

See also

Snap points to grid

Описание

<put algorithm description here>

Параметри

Input Layer [vector: any]
<put parameter description here>
Horizontal spacing [number]

<put parameter description here>

Default: 0.1

Vertical spacing [number]

<put parameter description here>

Default: 0.1

Изходни резултати

Output [vector]
<put output description here>

Console usage

processing.runalg('qgis:snappointstogrid', input, hspacing, vspacing, output)

See also

Разрязване на векторен слой

Описание

<put algorithm description here>

Параметри

Input layer [vector: any]
<put parameter description here>
Unique ID field [tablefield: any]
<put parameter description here>

Изходни резултати

Output directory [directory]
<put output description here>

Console usage

processing.runalg('qgis:splitvectorlayer', input, field, output)

See also

Oriented minimum bounding box

Описание

Return an oriented minimum bounding Box layer by using the rotating calipers algorithm.

Параметри

Input layer [vector: any]
<put parameter description here>
Calculate OMBB for each feature separately [boolean]

<put parameter description here>

Default: True

Изходни резултати

Oriented_MBBox [vector]
The resulting layer.

Console usage

processing.runalg("qgis:orientedminimumboundingbox", input , by_feature, output)

See also