mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
43 lines
1.8 KiB
Plaintext
43 lines
1.8 KiB
Plaintext
{
|
|
"name": "single_sided_buffer",
|
|
"type": "function",
|
|
"groups": ["GeometryGroup"],
|
|
"description": "Returns a geometry formed by buffering out just one side of a linestring geometry. Distances are in the Spatial Reference System of this geometry.",
|
|
"arguments": [{
|
|
"arg": "geometry",
|
|
"description": "a (multi)linestring geometry"
|
|
}, {
|
|
"arg": "distance",
|
|
"description": "buffer distance. Positive values will be buffered to the left of lines, negative values to the right"
|
|
}, {
|
|
"arg": "segments",
|
|
"optional": true,
|
|
"default": "8",
|
|
"description": "number of segments to use to represent a quarter circle when a round join style is used. A larger number results in a smoother buffer with more nodes."
|
|
}, {
|
|
"arg": "join",
|
|
"optional": true,
|
|
"default": "1",
|
|
"description": "join style for corners, where 1 = round, 2 = miter and 3 = bevel"
|
|
}, {
|
|
"arg": "miter_limit",
|
|
"optional": true,
|
|
"default": "2.0",
|
|
"description": "limit on the miter ratio used for very sharp corners (when using miter joins only)"
|
|
}],
|
|
"examples": [{
|
|
"expression": "single_sided_buffer(@geometry, 10.5)",
|
|
"returns": "line buffered to the left by 10.5 units"
|
|
}, {
|
|
"expression": "single_sided_buffer(@geometry, -10.5)",
|
|
"returns": "line buffered to the right by 10.5 units"
|
|
}, {
|
|
"expression": "single_sided_buffer(@geometry, 10.5, segments:=16, join:=1)",
|
|
"returns": "line buffered to the left by 10.5 units, using more segments to result in a smoother buffer"
|
|
}, {
|
|
"expression": "single_sided_buffer(@geometry, 10.5, join:=3)",
|
|
"returns": "line buffered to the left by 10.5 units, using a beveled join"
|
|
}],
|
|
"tags": ["buffering", "spatial", "reference", "system", "linestring", "formed", "distances", "side"]
|
|
}
|