Importante
A tradução é um esforço comunitário você pode contribuir. Esta página está atualmente traduzida em 19.49%.
28.1.18. Raster tools
28.1.18.1. Align raster
NEW in 3.34
Aligns raster by resampling it to the same cell size and reprojecting to the same CRS as a reference raster.
Aviso
This algorithm is ONLY available in the Model Designer context. For other contexts, use instead Align rasters.
Parâmetros
Label |
Nome |
Type |
Descrição |
---|---|---|---|
Input layer |
|
[raster] |
Input raster layer to align |
Resampling method |
|
[enumeration] Default: 0 |
Method to use for input layer resampling.
|
Rescale values according to the cell size |
|
[boolean] Default: No |
|
Reference layer |
|
[raster] |
A raster layer that will be used to fetch extent, cell size and CRS that will be applied to input layers. |
Override reference CRS Opcional |
|
[crs] |
CRS to be used instead of the reference layer’s |
Override reference cell size X Opcional |
|
[number] |
Cell size in X direction to be used instead of the reference layer’s |
Override reference cell size Y Opcional |
|
[number] |
Cell size in Y direction to be used instead of the reference layer’s |
Override reference grid offset X Opcional |
|
[number] |
Offset in X direction to apply to cells grid |
Override reference grid offset Y Opcional |
|
[number] |
Offset in Y direction to apply to cells grid |
Clip to extent Opcional |
|
[extent] |
Specify the extent of the output raster layer. It will internally be extended to a multiple of the tile size. Available methods are:
|
Aligned raster |
|
[raster] |
output raster with pixels resampled |
Resultados
Label |
Nome |
Type |
Descrição |
---|---|---|---|
Aligned raster |
|
[raster] |
output raster with pixels resampled |
Python code
Algorithm ID: native:alignsingleraster
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 Usando os algoritmos do processamento a partir da consola for details on how to run processing algorithms from the Python console.
28.1.18.2. Align rasters
NEW in 3.34
Aligns rasters by resampling them to the same cell size and reprojecting to the same CRS as a reference raster.
Aviso
This algorithm is NOT available in the Model Designer context. Use instead Align raster.
Parâmetros
Label |
Nome |
Type |
Descrição |
---|---|---|---|
Input layers |
|
[raster] [list] |
List of input raster layers with resampling options associated
(filled as a
Rescale values according to the cell size [boolean] ( |
Reference layer |
|
[raster] |
A raster layer that will be used to fetch extent, cell size and CRS that will be applied to input layers. |
Override reference CRS Opcional |
|
[crs] |
CRS to be used instead of the reference layer’s |
Override reference cell size X Opcional |
|
[number] |
Cell size in X direction to be used instead of the reference layer’s |
Override reference cell size Y Opcional |
|
[number] |
Cell size in Y direction to be used instead of the reference layer’s |
Override reference grid offset X Opcional |
|
[number] |
Offset in X direction to apply to cells grid |
Override reference grid offset Y Opcional |
|
[number] |
Offset in Y direction to apply to cells grid |
Clip to extent Opcional |
|
[extent] |
Specify the extent of the output raster layer. It will internally be extended to a multiple of the tile size. Available methods are:
|
Resultados
Label |
Nome |
Type |
Descrição |
---|---|---|---|
Aligned rasters |
|
[raster] [list] |
output rasters with pixels resampled |
Python code
Algorithm ID: native:alignrasters
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 Usando os algoritmos do processamento a partir da consola for details on how to run processing algorithms from the Python console.
28.1.18.3. Convert map to raster
Creates a raster image of map canvas content.
A map theme can be selected to render a predetermined set of layers with a defined style for each layer.
Alternatively, a single layer can be selected if no map theme is set.
If neither map theme nor layer is set, the current map content will be rendered. The minimum extent entered will internally be extended to be a multiple of the tile size.
Parâmetros
Label |
Nome |
Type |
Descrição |
---|---|---|---|
Minimum extent to render (xmin, xmax, ymin, ymax) |
|
[extent] |
Specify the extent of the output raster layer. It will internally be extended to a multiple of the tile size. Available methods are:
|
Tile size |
|
[number] Default: 1024 |
Size of the tile of the output raster layer. Minimum value: 64. |
Map units per pixel |
|
[number] Default: 100.0 |
Pixel size (in map units). Minimum value: 0.0 |
Make background transparent |
|
[boolean] Default: False |
Allows exporting the map with a transparent background.
Outputs an RGBA (instead of RGB) image if set to |
Map theme to render Opcional |
|
[enumeration] |
Use an existing map theme for the rendering. |
Single layer to render Opcional |
|
[enumeration] |
Choose a single layer for the rendering |
Output layer |
|
[raster] Default: |
Specification of the output raster. One of:
|
Resultados
Label |
Nome |
Type |
Descrição |
---|---|---|---|
Output layer |
|
[raster] |
Output raster layer |
Python code
Algorithm ID: native: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 Usando os algoritmos do processamento a partir da consola for details on how to run processing algorithms from the Python console.
28.1.18.4. Fill NoData cells
Resets the NoData values in the input raster to a chosen value, resulting in raster dataset with no NoData pixels.
The algorithm respects the input raster data type, e.g. a floating point fill value will be truncated when applied to an integer raster.
Parâmetros
Label |
Nome |
Type |
Descrição |
---|---|---|---|
Input raster |
|
[raster] |
The raster to process. |
Band number |
|
[number] Default: 1 |
The band of the raster |
Fill value |
|
[number] Default: 1.0 |
Set the value to use for the NoData pixels |
Output raster |
|
[raster] Default: |
Specification of the output raster. One of:
|
Resultados
Label |
Nome |
Type |
Descrição |
---|---|---|---|
Output raster |
|
[raster] |
The output raster layer with filled data cells. |
Python code
Algorithm ID: native:fillnodata
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 Usando os algoritmos do processamento a partir da consola for details on how to run processing algorithms from the Python console.
28.1.18.5. Generate XYZ tiles (Directory)
Generates raster “XYZ” tiles using the current QGIS project as individual images to a directory structure.
Optionally, a Leaflet HTML output file using the generated tiles as a map layer could be created.
Parâmetros
Basic parameters
Label |
Nome |
Type |
Descrição |
---|---|---|---|
Extent (xmin, xmax, ymin, ymax) |
|
[extent] |
Specify the extent of the tiles. It will internally be extended to a multiple of the tile size. Available methods are:
|
Minimum zoom |
|
[number] Default: 12 |
Minimum 0, maximum 25. |
Maximum zoom |
|
[number] Default: 12 |
Minimum 0, maximum 25. |
DPI |
|
[number] Default: 96 |
Minimum 48, maximum 600. |
Background color Opcional |
|
[color] Default: QColor(0, 0, 0, 0) |
Choose the background color for the tiles |
Enable antialiasing |
|
[boolean] Default: True |
Determines if antialiasing should be enabled |
Tile format |
|
[enumeration] Default: 0 |
One of:
|
Quality (JPG only) Opcional |
|
[number] Default: 75 |
Minimum 1, maximum 100. |
Metatile size Opcional |
|
[number] Default: 4 |
Specify a custom metatile size when generating XYZ tiles. Larger values may speed up the rendering of tiles and provide better labelling (fewer gaps without labels) at the expense of using more memory. Minimum 1, maximum 20. |
Tile width Opcional |
|
[number] Default: 256 |
Minimum 1, maximum 4096. |
Tile height Opcional |
|
[number] Default: 256 |
Minimum 1, maximum 4096. |
Use inverted tile Y axis (TMS conventions) Opcional |
|
[boolean] Default: False |
|
Output directory Opcional |
|
[folder] Default: |
Specification of the output directory (for the tiles). One of:
|
Output html (Leaflet) Opcional |
|
[html] Default: |
Specification of the output HTML file. One of:
|
Advanced parameters
NEW in 3.30
Label |
Nome |
Type |
Descrição |
---|---|---|---|
Leaflet HTML output title Opcional |
|
[string] Default: Not set |
HTML <title>-tag used for the Leaflet HTML output file. |
Leaflet HTML output attribution Opcional |
|
[string] Default: Not set |
Custom map attribution used for the Leaflet HTML output file. HTML links are possible. |
Include OpenStreetMap basemap in Leaflet HTML output Opcional |
|
[boolean] Default: False |
An OpenStreetMap basemap layer (source: https://tile.openstreetmap.org) is included in the Leaflet HTML output file. Proper map attribution is added automatically. |
Resultados
Label |
Nome |
Type |
Descrição |
---|---|---|---|
Output directory |
|
[folder] |
Output directory (for the tiles) |
Output html (Leaflet) |
|
[html] |
The output HTML (Leaflet) file |
Python code
Algorithm ID: native:tilesxyzdirectory
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 Usando os algoritmos do processamento a partir da consola for details on how to run processing algorithms from the Python console.
28.1.18.6. Generate XYZ tiles (MBTiles)
Generates raster “XYZ” tiles using the current QGIS project as a single file in the “MBTiles” format.
Parâmetros
Label |
Nome |
Type |
Descrição |
---|---|---|---|
Extent (xmin, xmax, ymin, ymax) |
|
[extent] |
Specify the extent of the tiles. It will internally be extended to a multiple of the tile size. Available methods are:
|
Minimum zoom |
|
[number] Default: 12 |
Minimum 0, maximum 25. |
Maximum zoom |
|
[number] Default: 12 |
Minimum 0, maximum 25. |
DPI |
|
[number] Default: 96 |
Minimum 48, maximum 600. |
Background color Opcional |
|
[color] Default: QColor(0, 0, 0, 0) |
Choose the background color for the tiles |
Enable antialiasing |
|
[boolean] Default: True |
Determines if antialiasing should be enabled |
Tile format |
|
[enumeration] Default: 0 |
One of:
|
Quality (JPG only) Opcional |
|
[number] Default: 75 |
Minimum 1, maximum 100. |
Metatile size Opcional |
|
[number] Default: 4 |
Specify a custom metatile size when generating XYZ tiles. Larger values may speed up the rendering of tiles and provide better labelling (fewer gaps without labels) at the expense of using more memory. Minimum 1, maximum 20. |
Output file (for MBTiles) |
|
[file] Default: |
Specification of the output file. One of:
|
Resultados
Label |
Nome |
Type |
Descrição |
---|---|---|---|
Output file (for MBTiles) |
|
[file] |
The output file. |
Python code
Algorithm ID: native:tilesxyzmbtiles
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 Usando os algoritmos do processamento a partir da consola for details on how to run processing algorithms from the Python console.