-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[expressions] Add make_line and make_polygon functions
- Loading branch information
1 parent
fccf54b
commit de15403
Showing
4 changed files
with
98 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,13 @@ | ||
{ | ||
"name": "make_line", | ||
"type": "function", | ||
"description": "Creates a line geometry from a series of point geometries.", | ||
"variableLenArguments": true, | ||
"arguments": [ | ||
{"arg":"point1", "syntaxOnly": true}, | ||
{"arg":"point2", "syntaxOnly": true}, | ||
{"arg":"point", "descOnly": true, "description":"a point geometry"}], | ||
"examples": [ { "expression":"geom_to_wkt(make_line(make_point(2,4),make_point(3,5)))", "returns":"'LineString (2 4, 3 5)'"}, | ||
{ "expression":"geom_to_wkt(make_line(make_point(2,4),make_point(3,5),make_point(9,7)))", "returns":"'LineString (2 4, 3 5, 9 7)'"} | ||
] | ||
} |
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,14 @@ | ||
{ | ||
"name": "make_polygon", | ||
"type": "function", | ||
"description": "Creates a polygon geometry from an outer ring and optional series of inner ring geometries.", | ||
"variableLenArguments": true, | ||
"arguments": [ | ||
{"arg":"outerRing", "description": "closed line geometry for polygon's outer ring"}, | ||
{"arg":"innerRing1", "syntaxOnly": true}, | ||
{"arg":"innerRing2", "syntaxOnly": true}, | ||
{"arg":"innerRing", "descOnly": true, "description":"optional closed line geometry for inner ring"}], | ||
"examples": [ { "expression":"geom_to_wkt(make_polygon(geom_from_wkt('LINESTRING( 0 0, 0 1, 1 1, 1 0, 0 0 )')))", "returns":"'Polygon ((0 0, 0 1, 1 1, 1 0, 0 0))'"}, | ||
{ "expression":"geom_to_wkt(make_polygon(geom_from_wkt('LINESTRING( 0 0, 0 1, 1 1, 1 0, 0 0 )'),geom_from_wkt('LINESTRING( 0.1 0.1, 0.1 0.2, 0.2 0.2, 0.2 0.1, 0.1 0.1 )'),geom_from_wkt('LINESTRING( 0.8 0.8, 0.8 0.9, 0.9 0.9, 0.9 0.8, 0.8 0.8 )')))", "returns":"'Polygon ((0 0, 0 1, 1 1, 1 0, 0 0),(0.1 0.1, 0.1 0.2, 0.2 0.2, 0.2 0.1, 0.1 0.1),(0.8 0.8, 0.8 0.9, 0.9 0.9, 0.9 0.8, 0.8 0.8))'"} | ||
] | ||
} |
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