Ważne
Tłumaczenie jest wysiłkiem społeczności QGISa przyłącz się. Ta strona jest obecnie przetłumaczona w 61.93%.
24.2.2. Raster conversion
24.2.2.1. gdal2xyz
Converts raster data to XYZ ASCII file format.
Parametry
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
Warstwa wejściowa |
|
[raster] |
Raster layer to convert |
Band number |
|
[raster band] Default: The first band of the input layer |
If the raster is multiband, choose the band you want to convert |
Input pixel value to treat as NoData Opcjonalne |
|
[numeric: integer] Domyślnie: Nie ustawiono |
Input pixel value to treat as „NoData” (GDAL >= 3.7). |
Destination NoData Opcjonalne |
|
[numeric: integer] Domyślnie: Nie ustawiono |
Assign specified „NoData” value to output (GDAL >= 3.7). |
Do not output NoData values |
|
[wartość logiczna] Domyślnie: False |
Do not output „NoData” values (GDAL >= 3.3). |
Output comma-separated values |
|
[wartość logiczna] Domyślnie: False |
Sets whether the output file should be of type comma-separated values (csv). |
XYZ ASCII file |
|
[plik] Domyślnie: |
Specification of the output file. One of:
|
Wyniki
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
XYZ ASCII file |
|
[tabela] |
Table file containing the values exported from the raster band. |
Kod pythona
ID algorytmu: gdal:gdal2xyz
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
24.2.2.2. PCT to RGB
Converts an 8 bit paletted image to a 24 bit RGB. It will convert a pseudocolor band from the input file to an RGB file of the desired format.
This algorithm is derived from the GDAL pct2rgb utility.
Default menu:
Parametry
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
Warstwa wejściowa |
|
[raster] |
Input 8 bit raster image |
Band number |
|
[raster band] Default: The first band of the input layer |
If the raster is multiband, choose the band you want to convert |
Generate a RGBA file |
|
[wartość logiczna] Domyślnie: False |
Sets whether the output file should be of type RGBA. |
PCT to RGB |
|
[plik] Domyślnie: |
Specification of the output file. One of:
|
Wyniki
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
PCT to RGB |
|
[raster] |
24 bit RGB raster image |
Kod pythona
ID algorytmu: gdal:pcttorgb
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
24.2.2.3. Polygonize (raster to vector)
Creates vector polygons for all connected regions of pixels in the raster sharing a common pixel value. Each polygon is created with an attribute indicating the pixel value of that polygon.
This algorithm is derived from the GDAL polygonize utility.
Default menu:
Parametry
Parametry podstawowe
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
Warstwa wejściowa |
|
[raster] |
Input raster layer |
Band number |
|
[raster band] Default: The first band of the input layer |
If the raster is multiband, choose the band you want to use |
Name of the field to create |
|
[ciąg tekstowy] Domyślnie: «DN» |
Specify the field name for the attributes of the connected regions. |
Use 8-connectedness |
|
[wartość logiczna] Domyślnie: False |
If not set, raster cells must have a common border to be considered connected (4-connected). If set, touching raster cells are also considered connected (8-connected). |
Zwektoryzowany |
|
[vector: polygon] Domyślnie: |
Specification of the output (polygon) vector layer. One of:
|
Parametry zaawansowane
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
Additional command-line parameters Opcjonalne |
|
[ciąg tekstowy] Domyślnie: Nie ustawiono |
Add extra GDAL command line options |
Wyniki
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
Zwektoryzowany |
|
[vector: polygon] |
Output vector layer |
Kod pythona
ID algorytmu: gdal:polygonize
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
24.2.2.4. Rearrange bands
Creates a new raster using selected band(s) from a given raster layer. The algorithm also makes it possible to reorder the bands for the newly-created raster.
This algorithm is derived from the GDAL translate utility.
Parametry
Parametry podstawowe
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
Warstwa wejściowa |
|
[raster] |
Input raster layer |
Selected band(s) |
|
[raster band] [list] Domyślnie: Nie ustawiono |
Ordered list of the bands to use to create the new raster |
Przekonwertowany |
|
[raster] Domyślnie: |
Specification of the output raster. One of:
|
Parametry zaawansowane
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
Additional creation options Opcjonalne |
|
[ciąg tekstowy] Domyślnie: «» |
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). Batch Process and Model Designer: separate multiple options with a pipe
character ( |
Output data type |
|
[wyliczenie] Domyślnie: 0 |
Defines the data type of the output raster file. Options:
Available options depend on the GDAL version built with QGIS (see menu) |
Wyniki
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
Przekonwertowany |
|
[raster] |
Output raster layer with rearranged bands. |
Kod pythona
ID algorytmu: gdal:rearrange_bands
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
24.2.2.5. RGB to PCT
Converts a 24 bit RGB image into a 8 bit paletted. Computes an optimal pseudo-color table for the given RGB-image using a median cut algorithm on a downsampled RGB histogram. Then it converts the image into a pseudo-colored image using the color table. This conversion utilizes Floyd-Steinberg dithering (error diffusion) to maximize output image visual quality.
If you want to classify a raster map and want to reduce the number of classes it can be helpful to downsample your image with this algorithm before.
This algorithm is derived from the GDAL rgb2pct utility.
Default menu:
Parametry
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
Warstwa wejściowa |
|
[raster] |
Input (RGB) raster layer |
Number of colors |
|
[numeric: integer] Domyślnie: 2 |
The number of colors the resulting image will contain. A value from 2-256 is possible. |
RGB to PCT |
|
[raster] Domyślnie: |
Specification of the output raster. One of:
|
Wyniki
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
RGB to PCT |
|
[raster] |
Raster wyjściowy. |
Kod pythona
ID algorytmu: gdal:rgbtopct
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
24.2.2.6. Translate (convert format)
Converts raster data between different formats.
This algorithm is derived from the GDAL translate utility.
Default menu:
Parametry
Parametry podstawowe
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
Warstwa wejściowa |
|
[raster] |
Input raster layer |
Override the projection of the output file Opcjonalne |
|
[układ współrzędnych] |
Specify a projection for the output file |
Assign a specified NoData value to output bands Opcjonalne |
|
[numeric: double] Domyślnie: Nie ustawiono |
Defines the value to use for NoData in the output raster |
Copy all subdatasets of this file to individual output files |
|
[wartość logiczna] Domyślnie: False |
Create individual files for subdatasets |
Przekonwertowany |
|
[raster] Domyślnie: |
Specification of the output (translated) raster layer. One of:
|
Parametry zaawansowane
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
Additional creation options Opcjonalne |
|
[ciąg tekstowy] Domyślnie: «» |
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). Batch Process and Model Designer: separate multiple options with a pipe
character ( |
Additional command-line parameters Opcjonalne |
|
[ciąg tekstowy] Domyślnie: Nie ustawiono |
Add extra GDAL command line options |
Output data type |
|
[wyliczenie] Domyślnie: 0 |
Defines the data type of the output raster file. Options:
Available options depend on the GDAL version built with QGIS (see menu) |
Wyniki
Etykieta |
Nazwa |
Typ |
Opis |
---|---|---|---|
Przekonwertowany |
|
[raster] |
Output (translated) raster layer. |
Kod pythona
ID algorytmu: gdal:translate
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.