-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Add expression functions for tapered and variable
width buffers Adds: - tapered_buffer - buffer_by_m expression functions. These expose the same functionality as the equivalent processing algorithms but for use in expressions such as geometry generators.
- Loading branch information
1 parent
9ffae60
commit 6ca3270
Showing
4 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "buffer_by_m", | ||
"type": "function", | ||
"description": "Creates a buffer along a line geometry where the buffer diameter varies according to the m-values at the line vertices.", | ||
"arguments": [ {"arg":"geometry","description":"input geometry. Must be a (multi)line geometry with m values."}, | ||
{"arg":"segments","optional":true,"default":"8","description":"number of segments to approximate quarter-circle curves in the buffer."}], | ||
"examples": [ { "expression":"buffer_by_m(geometry:=geom_from_wkt('LINESTRINGM(1 2 0.5, 4 2 0.2)'),segments:=8)", "returns":"A variable width buffer starting with a diameter of 0.5 and ending with a diameter of 0.2 along the linestring geometry."}] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "tapered_buffer", | ||
"type": "function", | ||
"description": "Creates a buffer along a line geometry where the buffer diameter varies evenly over the length of the line.", | ||
"arguments": [ {"arg":"geometry","description":"input geometry. Must be a (multi)line geometry."}, | ||
{"arg":"start_width","description":"width of buffer at start of line,"}, | ||
{"arg":"end_width","description":"width of buffer at end of line."}, | ||
{"arg":"segments","optional":true,"default":"8","description":"number of segments to approximate quarter-circle curves in the buffer."}], | ||
"examples": [ { "expression":"tapered_buffer(geometry:=geom_from_wkt('LINESTRING(1 2, 4 2)'),start_width:=1,end_width:=2,segments:=8)", "returns":"A tapered buffer starting with a diameter of 1 and ending with a diameter of 2 along the linestring geometry."}] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters