23.2.6. Conversione vettoriale

23.2.6.1. Converti formato

Converte qualsiasi livello vettoriale supportato OGR in un altro formato supportato.

This algorithm is derived from the ogr2ogr utility.

23.2.6.1.1. Parametri

Etichetta

Nome

Tipo

Descrizione

Livello in ingresso

IN INGRESSO

[vettore: qualsiasi]

Livello vettoriale in ingresso

Opzioni addizionali di creazione

(opzionale)

OPZIONI

[stringa]

Predefinito: » (nessuna opzione aggiuntiva)

Opzioni aggiuntive di creazione GDAL.

Convertito

IN USCITA

[lo stesso del livello in ingresso]

Specificare il livello vettoriale in uscita. Uno fra:

  • Salva come File Temporaneo

  • Salva come File…

La codifica del file può anche essere cambiata qui.

Per Salva come File, il formato in uscita deve essere specificato. Tutti i formati vettoriali GDAL sono supportati. Per Salva come File Temporaneo verrà usato il formato vettoriale predefinito di QGIS.

23.2.6.1.2. In uscita:

Etichetta

Nome

Tipo

Descrizione

Convertito

IN USCITA

[lo stesso del livello in ingresso]

Livello vettoriale in uscita

23.2.6.1.3. Python code

Algorithm ID: gdal:convertformat

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

The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Usare gli algoritmi di Processing dalla console dei comandi for details on how to run processing algorithms from the Python console.

23.2.6.2. Rasterize (overwrite with attribute)

Overwrites a raster layer with values from a vector layer. New values are assigned based on the attribute value of the overlapping vector feature.

This algorithm is derived from the GDAL rasterize utility.

23.2.6.2.1. Parametri

Etichetta

Nome

Tipo

Descrizione

Livello in ingresso

IN INGRESSO

[vettore: qualsiasi]

Livello vettoriale in ingresso

Input raster layer

INPUT_RASTER

[raster]

Input raster layer

Field to use for a burn-in value

Optional

FIELD

[tablefield: numeric]

Defines the attribute field to use to set the pixels values

Add burn in values to existing raster values

ADD

[boolean]

Default: False

If False, pixels are assigned the selected field’s value. If True, the selected field’s value is added to the value of the input raster layer.

Additional command-line parameters

Optional

EXTRA

[stringa]

Default: “”

Add extra GDAL command line options

23.2.6.2.2. In uscita:

Etichetta

Nome

Tipo

Descrizione

Rasterized

IN USCITA

[raster]

The overwritten input raster layer

23.2.6.2.3. Python code

Algorithm ID: gdal:rasterize_over

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

The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Usare gli algoritmi di Processing dalla console dei comandi for details on how to run processing algorithms from the Python console.

23.2.6.3. Rasterize (overwrite with fixed value)

Overwrites parts of a raster layer with a fixed value. The pixels to overwrite are chosen based on the supplied (overlapping) vector layer.

This algorithm is derived from the GDAL rasterize utility.

23.2.6.3.1. Parametri

Etichetta

Nome

Tipo

Descrizione

Livello in ingresso

IN INGRESSO

[vettore: qualsiasi]

Livello vettoriale in ingresso

Input raster layer

INPUT_RASTER

[raster]

Input raster layer

A fixed value to burn

BURN

[numero]

Default: 0.0

The value to burn

Add burn in values to existing raster values

ADD

[boolean]

Default: False

If False, pixels are assigned the fixed value. If True, the fixed value is added to the value of the input raster layer.

Additional command-line parameters

Optional

EXTRA

[stringa]

Default: “”

Add extra GDAL command line options

23.2.6.3.2. In uscita:

Etichetta

Nome

Tipo

Descrizione

Rasterized

IN USCITA

[raster]

The overwritten input raster layer

23.2.6.3.3. Python code

Algorithm ID: gdal:rasterize_over_fixed_value

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

The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Usare gli algoritmi di Processing dalla console dei comandi for details on how to run processing algorithms from the Python console.

23.2.6.4. Rasterize (vector to raster)

Converts vector geometries (points, lines and polygons) into a raster image.

This algorithm is derived from the GDAL rasterize utility.

Default menu: Raster ▶ Conversion

23.2.6.4.1. Parametri

Etichetta

Nome

Tipo

Descrizione

Livello in ingresso

IN INGRESSO

[vettore: qualsiasi]

Livello vettoriale in ingresso

Field to use for a burn-in value

Optional

FIELD

[tablefield: numeric]

Defines the attribute field from which the attributes for the pixels should be chosen

A fixed value to burn

Optional

BURN

[numero]

Default: 0.0

A fixed value to burn into a band for all features.

Unità per la dimensione del raster in uscita

UNITÀ

[numero]

Predefinito: 0

Unità da usare per definire la dimensione/risoluzione del raster in uscita. Uno tra:

  • 0 — Pixel

  • 1 — Unità georeferenziata

Larghezza/risoluzione orizzontale

LARGHEZZA

[numero]

Default: 0.0

Imposta la larghezza (se l’unità di misura è «Pixel») o la risoluzione orizzontale (se l’unità di misura è «Unità georeferenziata») del raster in uscita. Valore minimo: 0.0.

Altezza/risoluzione verticale

ALTEZZA

[numero]

Default: 0.0

Imposta l’altezza (se l’unità di misura è «Pixel») o la risoluzione verticale (se l’unità di misura è «Unità georeferenziata») del raster in uscita.

Estensione file in uscita

ESTENSIONE

[estensione]

Extent of the output raster layer. If the extent is not specified, the minimum extent that covers the selected reference layer(s) will be used.

Assign a specified nodata value to output bands

Optional

NODATA

[numero]

Default: 0.0

Assigns a specified nodata value to output bands

Opzioni addizionali di creazione

Optional

OPZIONI

[stringa]

Default: “”

For adding one or more creation options that control the raster to be created (colors, block size, file compression…). For convenience, you can rely on predefined profiles (see GDAL driver options section).

Output data type

DATA_TYPE

[numero]

Predefinito: 5

Definisce il formato del file raster in uscita.

Opzioni:

  • 0 — Byte

  • 1 — Int16

  • 2 — UInt16

  • 3 — UInt32

  • 4 — Int32

  • 5 — Float32

  • 6 — Float64

  • 7 — CInt16

  • 8 — CInt32

  • 9 — CFloat32

  • 10 — CFloat64

Pre-initialize the output image with value

Optional

INIT

[numero]

Pre-initializes the output image bands with this value. Not marked as the nodata value in the output file. The same value is used in all the bands.

Invert rasterization

INVERT

[boolean]

Default: False

Burns the fixed burn value, or the burn value associated with the first feature into all parts of the image not inside the provided polygon.

Rasterized

IN USCITA

[raster]

Default: “[Save to temporary file]”

Specification of the output raster layer. One of:

  • Salva come File Temporaneo

  • Salva come File…

The file encoding can also be changed here For Save to File, the output format has to be specified. All GDAL raster formats are supported. For Save to a Temporary File the QGIS default raster format will be used.

23.2.6.4.2. In uscita:

Etichetta

Nome

Tipo

Descrizione

Rasterized

IN USCITA

[raster]

Livello raster in uscita

23.2.6.4.3. Python code

Algorithm ID: gdal:rasterize

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

The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Usare gli algoritmi di Processing dalla console dei comandi for details on how to run processing algorithms from the Python console.