Important
翻译是一项社区工作:ref:你可以加入<translation_guidelines>。此页面目前翻译进度为 45.41%。
24.1.11. Metadata tools
24.1.11.1. Add history metadata
Added in 3.42
Adds a new history entry to the layer's metadata.
参数
标注 |
名称 |
类型 |
描述 |
|---|---|---|---|
Layer |
|
[layer] |
The input layer (vector, raster, etc.) to which the history entry will be added. |
History entry |
|
[string] |
The text to be appended as a new entry in the layer's history metadata. This will be added to any existing history entries. |
输出
标注 |
名称 |
类型 |
描述 |
|---|---|---|---|
Output |
|
[same as input] |
The resulting layer with the updated history in its Metadata properties. |
Python代码
Algorithm ID: native:addhistorymetadata
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。
24.1.11.2. Copy Layer Metadata
Added in 3.42
Copies metadata from a source layer to a target layer. Any existing metadata in the target layer will be replaced with the metadata from the source layer. This includes all metadata fields, such as history, abstract, and other properties.
参数
标注 |
名称 |
类型 |
描述 |
|---|---|---|---|
Source layer |
|
[layer] |
The layer from which metadata will be copied. |
Target layer |
|
[layer] |
The layer to which metadata will be pasted. Any existing metadata in this layer will be replaced. |
Save metadata as default |
|
[boolean] Default: False |
If checked, the metadata information will be saved with the layer, hence available by default in subsequent projects. |
输出
标注 |
名称 |
类型 |
描述 |
|---|---|---|---|
Output layer |
|
[layer] |
The target layer with the metadata replaced by the metadata from the source layer. This includes all metadata fields, such as history, abstract, and other properties. |
Python代码
Algorithm ID: native:copylayermetadata
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。
24.1.11.3. Export Layer Metadata
Added in 3.42
Exports the metadata of a layer to a QMD file.
参数
标注 |
名称 |
类型 |
描述 |
|---|---|---|---|
Layer |
|
[layer] |
The layer whose metadata will be exported. |
Output |
|
[file] 默认: |
Specification of the output file. One of:
|
输出
标注 |
名称 |
类型 |
描述 |
|---|---|---|---|
Output file |
|
[file] |
The |
Python代码
Algorithm ID: native:exportlayermetadata
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。
24.1.11.4. Set Layer Metadata
Added in 3.42
Applies metadata to a layer from a .qmd file.
参数
标注 |
名称 |
类型 |
描述 |
|---|---|---|---|
Layer |
|
[layer] |
The layer to which the metadata will be applied. |
Metadata file |
|
[file] |
The |
Save metadata as default |
|
[boolean] Default: False |
If checked, the metadata information will be saved with the layer, hence available by default in subsequent projects. |
输出
标注 |
名称 |
类型 |
描述 |
|---|---|---|---|
Output layer |
|
[same as input] |
The input layer with the metadata replaced by the metadata from the |
Python代码
Algorithm ID: native:setlayermetadata
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。
24.1.11.5. Set Metadata Fields
Added in 3.42
Sets various metadata fields for a layer.
参数
标注 |
名称 |
类型 |
描述 |
|---|---|---|---|
Layer |
|
[layer] |
The layer whose metadata fields will be updated |
Identifier 可选 |
|
[string] |
A unique identifier for the layer |
Parent identifier 可选 |
|
[string] |
The identifier of the parent resource, if applicable |
Title 可选 |
|
[string] |
The title of the layer |
Type 可选 |
|
[string] |
The type of data stored in the layer |
Language 可选 |
|
[string] |
The language of the metadata |
Encoding 可选 |
|
[string] |
The character encoding used in the metadata |
Abstract 可选 |
|
[string] |
A brief description or abstract of the layer |
Coordinate reference system 可选 |
|
[crs] |
The coordinate reference system of the layer |
Fees 可选 |
|
[string] |
Information about any fees associated with accessing the layer |
Ignore empty fields |
|
[boolean] Default: False |
If checked, no update will be done to metadata fields that are not filled |
输出
标注 |
名称 |
类型 |
描述 |
|---|---|---|---|
Output layer |
|
[same as input] |
The input layer with the specified metadata fields updated. |
Python代码
Algorithm ID: native:setmetadatafields
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。
24.1.11.6. Update Layer Metadata
Added in 3.42
Copies all non-empty metadata fields from a source layer to a target layer. Leaves empty input fields unchanged in the target.
参数
标注 |
名称 |
类型 |
描述 |
|---|---|---|---|
Source layer |
|
[layer] |
The layer from which non-empty metadata fields will be copied |
Target layer |
|
[layer] |
The layer to which non-empty metadata fields will be pasted. Empty fields in the source layer will not overwrite existing metadata in the target layer. |
输出
标注 |
名称 |
类型 |
描述 |
|---|---|---|---|
Target layer |
|
[layer] |
The target layer with updated metadata. |
Python代码
Algorithm ID: native:updatelayermetadata
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。