重要
Translation is a community effort you can join. This page is currently translated at 48.72%.
28.2.7. Vector geoprocessing
28.2.7.1. Buffer vectors
Create buffers around the features of a vector layer.
参数
Basic parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
输入图层 |
|
[vector: any] |
The input vector layer |
Geometry column name |
|
[string] Default: 'geometry' |
The name of the input layer geometry column to use |
Buffer distance |
|
[数字] Default: 10.0 |
Minimum: 0.0 |
Dissolve by attribute 可选 |
|
[tablefield: any] Default: None |
Field to use for dissolving |
Dissolve results |
|
[boolean] Default: False |
|
Produce one feature for each geometry in any kind of geometry collection in the source file |
|
[boolean] Default: False |
|
Buffer |
|
[vector: polygon] 默认: |
Specify the output buffer layer. One of:
|
Advanced parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Additional creation options 可选 |
|
[string] Default: '' (no additional options) |
Additional GDAL creation options. |
输出
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Buffer |
|
[vector: polygon] |
The output buffer layer |
Python代码
Algorithm ID: gdal:buffervectors
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。
28.2.7.2. Clip vector by extent
Clips any OGR-supported vector file to a given extent.
This algorithm is derived from the GDAL ogr2ogr utility.
参数
Basic parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
输入图层 |
|
[vector: any] |
The input vector layer |
Clip extent |
|
[范围] |
Defines the bounding box that should be used for the output vector file. It has to be defined in target CRS coordinates. Available methods are:
|
Clipped (extent) |
|
[same as input] 默认: |
Specify the output (clipped) layer. One of:
|
Advanced parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Additional creation options 可选 |
|
[string] Default: '' (no additional options) |
Additional GDAL creation options. |
输出
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Clipped (extent) |
|
[same as input] |
The output (clipped) layer. The default format is "ESRI Shapefile". |
Python代码
Algorithm ID: gdal:clipvectorbyextent
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。
28.2.7.3. Clip vector by mask layer
Clips any OGR-supported vector layer by a mask polygon layer.
This algorithm is derived from the GDAL ogr2ogr utility.
参数
Basic parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
输入图层 |
|
[vector: any] |
The input vector layer |
Mask layer |
|
[vector: polygon] |
Layer to be used as clipping extent for the input vector layer. |
Clipped (mask) |
|
[same as input] 默认: |
The output (masked) layer. One of:
|
Advanced parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Additional creation options 可选 |
|
[string] Default: '' (no additional options) |
Additional GDAL creation options. |
输出
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Clipped (mask) |
|
[same as input] |
The output (masked) layer. The default format is "ESRI Shapefile". |
Python代码
Algorithm ID: gdal:clipvectorbypolygon
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。
28.2.7.4. 融合(dissolve)
Dissolve (combine) geometries that have the same value for a given attribute / field. The output geometries are multipart.
参数
Basic parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
输入图层 |
|
[vector: any] |
The input layer to dissolve |
Dissolve field 可选 |
|
[tablefield: any] |
The field of the input layer to use for dissolving |
Geometry column name |
|
[string] Default: 'geometry' |
The name of the input layer geometry column to use for dissolving. |
Dissolved |
|
[same as input] 默认: |
Specify the output layer. One of:
|
Advanced parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Produce one feature for each geometry in any kind of geometry collection in the source file |
|
[boolean] Default: False |
Produce one feature for each geometry in any kind of geometry collection in the source file |
Keep input attributes |
|
[boolean] Default: False |
Keep all attributes from the input layer |
Count dissolved features |
|
[boolean] Default: False |
Count the dissolved features and include it in the output layer. |
Compute area and perimeter of dissolved features |
|
[boolean] Default: False |
|
Compute min/max/sum/mean for attribute |
|
[boolean] Default: False |
Calculate statistics (min, max, sum and mean) for the numeric attribute specified and include them in the output layer |
Numeric attribute to calculate statistics on 可选 |
|
[tablefield: numeric] |
The numeric attribute to calculate statistics on |
Additional creation options 可选 |
|
[string] Default: '' (no additional options) |
Additional GDAL creation options. |
输出
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Dissolved |
|
[same as input] |
|
Python代码
Algorithm ID: gdal:dissolve
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。
28.2.7.5. Offset curve
Offsets lines by a specified distance. Positive distances will offset lines to the left, and negative distances will offset them to the right.
参数
Basic parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
输入图层 |
|
[vector: line] |
The input line layer |
Geometry column name |
|
[string] Default: 'geometry' |
The name of the input layer geometry column to use |
Offset distance (left-sided: positive, right-sided: negative) |
|
[数字] Default: 10.0 |
|
Offset curve |
|
[vector: line] 默认: |
Specify the output line layer. One of:
|
Advanced parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Additional creation options 可选 |
|
[string] Default: '' (no additional options) |
Additional GDAL creation options. |
输出
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Offset curve |
|
[vector: line] |
The output offset curve layer |
Python代码
Algorithm ID: gdal:offsetcurve
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。
28.2.7.6. One side buffer
Creates a buffer on one side (right or left) of the lines in a line vector layer.
参数
Basic parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
输入图层 |
|
[vector: line] |
The input line layer |
Geometry column name |
|
[string] Default: 'geometry' |
The name of the input layer geometry column to use |
Buffer distance |
|
[数字] Default: 10.0 |
|
Buffer side |
|
[enumeration] Default: 0 |
One of:
|
Dissolve by attribute 可选 |
|
[tablefield: any] Default: None |
Field to use for dissolving |
Dissolve all results |
|
[boolean] Default: False |
|
Produce one feature for each geometry in any kind of geometry collection in the source file |
|
[boolean] Default: False |
|
One-sided buffer |
|
[vector: polygon] 默认: |
Specify the output buffer layer. One of:
|
Advanced parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Additional creation options 可选 |
|
[string] Default: '' (no additional options) |
Additional GDAL creation options. |
输出
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
One-sided buffer |
|
[vector: polygon] |
The output buffer layer |
Python代码
Algorithm ID: gdal:onesidebuffer
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。
28.2.7.7. Points along lines
Generates a point on each line of a line vector layer at a distance from start. The distance is provided as a fraction of the line length.
参数
Basic parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
输入图层 |
|
[vector: line] |
The input line layer |
Geometry column name |
|
[string] Default: 'geometry' |
The name of the input layer geometry column to use |
Distance from line start represented as a fraction of line length |
|
[数字] Default: 0.5 (middle of the line) |
|
Points along lines |
|
[vector: point] 默认: |
Specify the output point layer. One of:
|
Advanced parameters
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Additional creation options 可选 |
|
[string] Default: '' (no additional options) |
Additional GDAL creation options. |
输出
标注 |
名称 |
类型 |
描述 |
---|---|---|---|
Points along line |
|
[vector: point] |
The output point layer |
Python代码
Algorithm ID: gdal:pointsalonglines
import processing
processing.run("algorithm_id", {parameter_dictionary})
当你在数据处理工具箱某个算法前悬停时,算法 id 将会展现。*参数字*将会提供参数的名称与数值。参考详见`数据处理_控制台`以获取如何从Python控制台中运行数据处理算法。