Important

Traducerea este un efort al comunității, la care puteți să vă alăturați. În prezent, această pagină este tradusă 69.37%.

28.2.8. Vector miscellaneous

28.2.8.1. Build virtual vector

Creates a virtual vector layer that contains a set of vector layers. The output virtual vector layer will not be opened in the current project.

This algorithm is especially useful in case another algorithm needs multiple layers but accept only one vrt in which the layers are specified.

Parametri

Etichetă

Nume

Tipul

Descriere

Input datasources

INPUT

[vector: oricare] [list]

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

Create „unioned” VRT

UNIONED

[boolean]

Implicit: False

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

Virtual vector

OUTPUT

[la fel ca intrarea]

Implicit: [Salvare într-un fișier temporar]

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

  • Salvare într-un Fișier Temporar

  • Salvare în Fișier…

Rezultat

Etichetă

Nume

Tipul

Descriere

Virtual vector

OUTPUT

[vector: oricare]

The output virtual vector made from the chosen sources

Cod Python

Algorithm ID: gdal:buildvirtualvector

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID-ul algoritmului se afișează atunci când treceți peste algoritmul din caseta instrumentelor de procesare. Dicționarul parametrilor furnizează valorile și NUMELE parametrilor. Pentru detalii despre rularea algoritmilor de procesare din consola Python, parcurgeți Utilizarea algoritmilor de procesare din consolă.

28.2.8.2. Executare 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.

This algorithm is derived from the GDAL ogr2ogr utility.

Parametri

Parametri de bază

Etichetă

Nume

Tipul

Descriere

Strat de intrare

INPUT

[vector: oricare]

OGR-supported input vector layer

SQL expression

SQL

[string]

Defines the SQL query, for example SELECT * FROM my_table WHERE name is not null.

SQL dialect

DIALECT

[enumerare]

Implicit: 0

SQL dialect to use. One of:

  • 0 — Niciunul

  • 1 — OGR SQL

  • 2 — SQLite

SQL result

OUTPUT

[vector: oricare]

Specification of the output layer. One of:

  • Salvare într-un Fișier Temporar

  • Salvare în Fișier…

For Save to File, the output format has to be specified. All GDAL vector formats are supported. For Save to a Temporary File the default output vector layer format will be used.

Parametri avansați

Etichetă

Nume

Tipul

Descriere

Opțiuni suplimentare de creare

Opţional

OPTIONS

[string]

Implicit: «» (fără opțiuni adiționale)

Additional GDAL creation options.

Rezultat

Etichetă

Nume

Tipul

Descriere

SQL result

OUTPUT

[vector: oricare]

Stratul vectorial creat de interogare

Cod Python

Algorithm ID: gdal:executesql

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID-ul algoritmului se afișează atunci când treceți peste algoritmul din caseta instrumentelor de procesare. Dicționarul parametrilor furnizează valorile și NUMELE parametrilor. Pentru detalii despre rularea algoritmilor de procesare din consola Python, parcurgeți Utilizarea algoritmilor de procesare din consolă.

28.2.8.3. Export to PostgreSQL (available connections)

Imports vector layers inside a PostgreSQL database on the basis of an available connection. The connection has to be defined properly beforehand. Be aware that the checkboxes «Save Username» and «Save Password» are activated. Then you can use the algorithm.

This algorithm is derived from the GDAL ogr2ogr utility.

Parametri

Etichetă

Nume

Tipul

Descriere

Database (connection name)

DATABASE

[string]

The PostgreSQL database to connect to

Strat de intrare

INPUT

[vector: oricare]

OGR-supported vector layer to export to the database

Shape encoding

Opţional

SHAPE_ENCODING

[string]

Implicit: „

Sets the encoding to apply to the data

Output geometry type

GTYPE

[enumerare]

Implicit: 0

Defines the output geometry type. One of:

  • 0 —

  • 1 — NONE

  • 2 — GEOMETRY

  • 3 — POINT

  • 4 — LINESTRING

  • 5 — POLYGON

  • 6 — GEOMETRYCOLLECTION

  • 7 — MULTIPOINT

  • 8 — MULTIPOLYGON

  • 9 — MULTILINESTRING

Assign an output CRS

Opţional

A_SRS

[crs]

Default: Nici o valoare

Defines the output CRS of the database table

Reproject to this CRS on output

Opţional

T_SRS

[crs]

Default: Nici o valoare

Reprojects/transforms to this CRS on output

Override source CRS

Opţional

S_SRS

[crs]

Default: Nici o valoare

Overrides the input layer CRS

Schema (schema name)

Opţional

SCHEMA

[string]

Implicit: «public»

Defines the schema for the database table

Table to export to (leave blank to use layer name)

Opţional

TABLE

[string]

Implicit: „

Defines a name for the table that will be imported into the database. By default the table name is the name of the input vector file.

Primary Key (new field)

Opţional

PK

[string]

Implicit: «id»

Defines which attribute field will be the primary key of the database table

Primary Key (existing field, used if the above option is left empty)

Opţional

PRIMARY_KEY

[tablefield: any]

Default: Nici o valoare

Defines which attribute field in the exported layer will be the primary key of the database table

Geometry column name

Opţional

GEOCOLUMN

[string]

Implicit: «geom»

Defines in which attribute field of the database there will be the geometry information

Vector dimensions

Opţional

DIM

[enumerare]

Implicit: 0 (2D)

Defines if the vector file to be imported has 2D or 3D data. One of:

  • 0 — 2

  • 1 — 3

Distance tolerance for simplification

Opţional

SIMPLIFY

[string]

Implicit: „

Defines a distance tolerance for the simplification of the vector geometries to be imported. By default there is no simplification.

Maximum distance between 2 nodes (densification)

Opţional

SEGMENTIZE

[string]

Implicit: „

The maximum distance between two nodes. Used to create intermediate points. By default there is no densification.

Select features by extent (defined in input layer CRS)

Opţional

SPAT

[extent]

Default: Nici o valoare

You can select features from a given extent that will be in the output table.

Metodele disponibile sunt:

  • Calculate from layer…: uses extent of a layer loaded in the current project

  • Calculate from layout map…: uses extent of a layout map item in the active project

  • Calculate from bookmark…: uses extent of a saved bookmark

  • Use map canvas extent

  • Draw on canvas: click and drag a rectangle delimiting the area to take into account

  • Enter the coordinates as xmin, xmax, ymin, ymax

Clip the input layer using the above (rectangle) extent

Opţional

CLIP

[boolean]

Implicit: False

The input layer will be clipped by the extent you defined before

Select features using a SQL „WHERE” statement (Ex: column=”value”)

Opţional

WHERE

[string]

Implicit: „

Defines with a SQL „WHERE” statement which features should be selected from the input layer

Group N features per transaction (Default: 2000)

Opţional

GT

[string]

Implicit: „

You can group the input features in transactions where N defines the size. By default N limits the transaction size to 20000 features.

Overwrite existing table

Opţional

OVERWRITE

[boolean]

Implicit: True

If there is a table with the same name in the database, and if this option is set to True, the table will be overwritten.

Append to existing table

Opţional

APPEND

[boolean]

Implicit: False

If checked / True the vector data will be appended to an existing table. New fields found in the input layer are ignored. By default a new table will be created.

Append and add new fields to existing table

Opţional

ADDFIELDS

[boolean]

Implicit: False

If activated the vector data will be appended to an existing table, there won’t be a new table created. New fields found in input layer are added to the table. By default a new table will be created.

Do not launder columns/table names

Opţional

LAUNDER

[boolean]

Implicit: False

With this option checked you can prevent the default behaviour (converting column names to lowercase, removing spaces and other invalid characters).

Do not create Spatial Index

Opţional

INDEX

[boolean]

Implicit: False

Prevents a spatial index for the output table from being created. By default, a spatial index is added.

Continue after a failure, skipping the failed feature

Opţional

SKIPFAILURES

[boolean]

Implicit: False

Promote to Multipart

Opţional

PROMOTETOMULTI

[boolean]

Implicit: True

Casts features geometry type to multipart in the output table

Keep width and precision of input attributes

Opţional

PRECISION

[boolean]

Implicit: True

Avoids modifying column attributes to comply with input data

Opțiuni suplimentare de creare

Opţional

OPTIONS

[string]

Implicit: «» (fără opțiuni adiționale)

Additional GDAL creation options.

Rezultat

This algorithm has no output.

Cod Python

Algorithm ID: gdal:importvectorintopostgisdatabaseavailableconnections

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID-ul algoritmului se afișează atunci când treceți peste algoritmul din caseta instrumentelor de procesare. Dicționarul parametrilor furnizează valorile și NUMELE parametrilor. Pentru detalii despre rularea algoritmilor de procesare din consola Python, parcurgeți Utilizarea algoritmilor de procesare din consolă.

28.2.8.4. Export to PostgreSQL (new connection)

Imports vector layers inside a PostgreSQL database. A new connection to the PostGIS database must be created.

This algorithm is derived from the GDAL ogr2ogr utility.

Parametri

Etichetă

Nume

Tipul

Descriere

Strat de intrare

INPUT

[vector: oricare]

OGR-supported vector layer to export to the database

Shape encoding

Opţional

SHAPE_ENCODING

[string]

Implicit: „

Sets the encoding to apply to the data

Output geometry type

GTYPE

[enumerare]

Implicit: 0

Defines the output geometry type. One of:

  • 0 —

  • 1 — NONE

  • 2 — GEOMETRY

  • 3 — POINT

  • 4 — LINESTRING

  • 5 — POLYGON

  • 6 — GEOMETRYCOLLECTION

  • 7 — MULTIPOINT

  • 8 — MULTIPOLYGON

  • 9 — MULTILINESTRING

Assign an output CRS

Opţional

A_SRS

[crs]

Default: Nici o valoare

Defines the output CRS of the database table

Reproject to this CRS on output

Opţional

T_SRS

[crs]

Default: Nici o valoare

Reprojects/transforms to this CRS on output

Override source CRS

Opţional

S_SRS

[crs]

Default: Nici o valoare

Overrides the input layer CRS

Host

Opţional

HOST

[string]

Implicit: «localhost»

Name of the database host

Port

Opţional

PORT

[string]

Implicit: «5432»

Port number the PostgreSQL database server listens on

Username

Opţional

USER

[string]

Implicit: „

User name used to log in to the database

Database name

Opţional

DBNAME

[string]

Implicit: „

Name of the database

Password

Opţional

PASSWORD

[string]

Implicit: „

Password used with Username to connect to the database

Schema (schema name)

Opţional

SCHEMA

[string]

Implicit: «public»

Defines the schema for the database table

Table name, leave blank to use input name

Opţional

TABLE

[string]

Implicit: „

Defines a name for the table that will be imported into the database. By default the table name is the name of the input vector file.

Primary Key (new field)

Opţional

PK

[string]

Implicit: «id»

Defines which attribute field will be the primary key of the database table

Primary Key (existing field, used if the above option is left empty)

Opţional

PRIMARY_KEY

[tablefield: any]

Default: Nici o valoare

Defines which attribute field in the exported layer will be the primary key of the database table

Geometry column name

Opţional

GEOCOLUMN

[string]

Implicit: «geom»

Defines in which attribute field to store the geometry information

Vector dimensions

Opţional

DIM

[enumerare]

Implicit: 0 (2D)

Defines if the vector file to be imported has 2D or 3D data. One of:

  • 0 — 2D

  • 1 — 3D

Distance tolerance for simplification

Opţional

SIMPLIFY

[string]

Implicit: „

Defines a distance tolerance for the simplification of the vector geometries to be imported. By default there is no simplification.

Maximum distance between 2 nodes (densification)

Opţional

SEGMENTIZE

[string]

Implicit: „

The maximum distance between two nodes. Used to create intermediate points. By default there is no densification.

Select features by extent (defined in input layer CRS)

Opţional

SPAT

[extent]

Default: Nici o valoare

You can select features from a given extent that will be in the output table.

Metodele disponibile sunt:

  • Calculate from layer…: uses extent of a layer loaded in the current project

  • Calculate from layout map…: uses extent of a layout map item in the active project

  • Calculate from bookmark…: uses extent of a saved bookmark

  • Use map canvas extent

  • Draw on canvas: click and drag a rectangle delimiting the area to take into account

  • Enter the coordinates as xmin, xmax, ymin, ymax

Clip the input layer using the above (rectangle) extent

Opţional

CLIP

[boolean]

Implicit: False

The input layer will be clipped by the extent you defined before

Fields to include (leave empty to use all fields)

Opţional

FIELDS

[string] [list]

Implicit: []

Defines fields to keep from the imported vector file. If none is selected, all the fields are imported.

Select features using a SQL „WHERE” statement (Ex: column=”value”)

Opţional

WHERE

[string]

Implicit: „

Defines with a SQL „WHERE” statement which features should be selected for the output table

Group N features per transaction (Default: 2000)

Opţional

GT

[string]

Implicit: „

You can group the input features in transactions where N defines the size. By default N limits the transaction size to 20000 features.

Overwrite existing table

Opţional

OVERWRITE

[boolean]

Implicit: True

If there is a table with the same name in the database, and if this option is set to True, the table will be overwritten.

Append to existing table

Opţional

APPEND

[boolean]

Implicit: False

If checked / True the vector data will be appended to an existing table. New fields found in the input layer are ignored. By default a new table will be created.

Append and add new fields to existing table

Opţional

ADDFIELDS

[boolean]

Implicit: False

If activated the vector data will be appended to an existing table, there won’t be created a new table. New fields found in input layer are added to the table. By default a new table will be created.

Do not launder columns/table names

Opţional

LAUNDER

[boolean]

Implicit: False

With this option checked you can prevent the default behaviour (converting column names to lowercase, removing spaces and other invalid characters).

Do not create Spatial Index

Opţional

INDEX

[boolean]

Implicit: False

Prevents a spatial index for the output table from being created. By default, a spatial index is added.

Continue after a failure, skipping the failed feature

Opţional

SKIPFAILURES

[boolean]

Implicit: False

Promote to Multipart

Opţional

PROMOTETOMULTI

[boolean]

Implicit: True

Casts features geometry type to multipart in the output table

Keep width and precision of input attributes

Opţional

PRECISION

[boolean]

Implicit: True

Avoids modifying column attributes to comply with input data

Opțiuni suplimentare de creare

Opţional

OPTIONS

[string]

Implicit: «» (fără opțiuni adiționale)

Additional GDAL creation options.

Rezultat

This algorithm has no output.

Cod Python

Algorithm ID: gdal:importvectorintopostgisdatabasenewconnection

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID-ul algoritmului se afișează atunci când treceți peste algoritmul din caseta instrumentelor de procesare. Dicționarul parametrilor furnizează valorile și NUMELE parametrilor. Pentru detalii despre rularea algoritmilor de procesare din consola Python, parcurgeți Utilizarea algoritmilor de procesare din consolă.

28.2.8.5. Vector Information

Creates an information file that lists information about an OGR-supported data source. The output will be shown in a «Result» window and can be written into a HTML-file. The information includes the geometry type, feature count, the spatial extent, the projection information and many more.

This algorithm is derived from the GDAL ogrinfo utility.

Parametri

Etichetă

Nume

Tipul

Descriere

Strat de intrare

INPUT

[vector: oricare]

Stratul vectorial de intrare

Summary output only

Opţional

SUMMARY_ONLY

[boolean]

Implicit: True

Suppress metadata info

Opţional

NO_METADATA

[boolean]

Implicit: False

Layer information

OUTPUT

[html]

Implicit: [Salvare într-un fișier temporar]

Specify the output HTML file that includes the file information. One of:

  • Salvare într-un Fișier Temporar

  • Salvare în Fișier…

If no HTML-file is defined the output will be written to a temporary file

Rezultat

Etichetă

Nume

Tipul

Descriere

Layer information

OUTPUT

[html]

The output HTML-file that includes the file information.

Cod Python

Algorithm ID: gdal:ogrinfo

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID-ul algoritmului se afișează atunci când treceți peste algoritmul din caseta instrumentelor de procesare. Dicționarul parametrilor furnizează valorile și NUMELE parametrilor. Pentru detalii despre rularea algoritmilor de procesare din consola Python, parcurgeți Utilizarea algoritmilor de procesare din consolă.