25.1.6. Layer tools
25.1.6.1. Export layer(s) information
NEW in 3.18
Creates a polygon layer with features corresponding to the extent of selected layer(s).
Additional layer details (CRS, provider name, file path, layer name, subset filter, abstract and attribution) are attached as attributes to each feature.
Parameter
Label |
Name |
Type |
Beschreibung |
---|---|---|---|
Input layers |
|
[vector: any][list] |
Input vector layers to get information on. |
Output |
|
[vector: polygon] Default: |
Specification of the output layer with information. One of:
The file encoding can also be changed here. |
Ausgaben
Label |
Name |
Type |
Beschreibung |
---|---|---|---|
Output |
|
[vector: polygon] |
Polygon vector layer showing extent of input layers and associated information in attributes. |
Python code
Algorithm ID: native:exportlayersinformation
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
25.1.6.2. Export to spreadsheet
Exports the attributes of a selection of vector layers into a spreadsheet document or optionally appends them to an existing spreadsheet as additional sheets.
Parameter
Label |
Name |
Type |
Beschreibung |
---|---|---|---|
Input layers |
|
[vector: any][list] |
Input vector layers. The output spreadsheet will consist of a sheet, for each layer, that contains the attributes of this layer. |
Use field aliases as column headings |
|
[boolean] Default: False |
Use the field aliases from the attribute table for the spreadsheet. |
Export formatted values instead of raw values |
|
[boolean] Default: False |
If |
Overwrite existing spreadsheet |
|
[boolean] Default: True |
If the specified spreadsheet exists, setting this option to |
Destination spreadsheet |
|
[file] Default: |
Output spreadsheet with a sheet for every layer. One of:
|
Ausgaben
Label |
Name |
Type |
Beschreibung |
---|---|---|---|
Destination spreadsheet |
|
[file] |
Spreadsheet with a sheet for every layer. |
Layers within spreadsheet |
|
[list] |
The list of sheets added to the spreadsheet. |
Python code
Algorithm ID: native:exporttospreadsheet
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
25.1.6.3. Extract layer extent
Generates a vector layer with the minimum bounding box (rectangle with N-S orientation) that covers all the input features.
The output layer contains a single bounding box for the whole input layer.
![../../../../_images/extract_layer_extent.png](../../../../_images/extract_layer_extent.png)
Abb. 25.7 In red the bounding box of the source layer
Default menu:
Parameter
Label |
Name |
Type |
Beschreibung |
---|---|---|---|
Layer |
|
[layer] |
Input layer |
Extent |
|
[vector: polygon] Default: |
Specify the polygon vector layer for the output extent. One of:
The file encoding can also be changed here. |
Ausgaben
Label |
Name |
Type |
Beschreibung |
---|---|---|---|
Extent |
|
[vector: polygon] |
Output (polygon) vector layer with the extent (minimum bounding box) |
Python code
Algorithm ID: qgis:polygonfromlayerextent
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.