-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[expressions] Allow make_point to accept z/m values, add new
make_point_m for creation of PointM geometries. Also add m(point) and z(point) functions for retrieving z/m value of a point or node.
- Loading branch information
1 parent
7439643
commit 12e34f2
Showing
6 changed files
with
118 additions
and
16 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,8 @@ | ||
{ | ||
"name": "m", | ||
"type": "function", | ||
"description": "Returns the m value of a point geometry.", | ||
"arguments": [ {"arg":"geom","description":"a point geometry"}], | ||
"examples": [ { "expression":"m( geom_from_wkt( 'POINTM(2 5 4)' ) )", "returns":"4"} | ||
] | ||
} |
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 |
---|---|---|
@@ -1,9 +1,14 @@ | ||
{ | ||
"name": "make_point", | ||
"type": "function", | ||
"description": "Creates a point geometry from an x and y value.", | ||
"description": "Creates a point geometry from an x and y (and optional z and m) value.", | ||
"arguments": [ | ||
{"arg":"x","description":"x coordinate of point"}, | ||
{"arg":"y","description":"y coordinate of point"} ], | ||
"examples": [ { "expression":"geom_to_wkt(make_point(2,4))", "returns":"'Point (2 4)'"}] | ||
{"arg":"y","description":"y coordinate of point"}, | ||
{"arg":"z","description":"optional z coordinate of point"}, | ||
{"arg":"m","description":"optional m value of point"} ], | ||
"examples": [ { "expression":"geom_to_wkt(make_point(2,4))", "returns":"'Point (2 4)'"}, | ||
{ "expression":"geom_to_wkt(make_point(2,4,6))", "returns":"'PointZ (2 4 6)'"}, | ||
{ "expression":"geom_to_wkt(make_point(2,4,6,8))", "returns":"'PointZM (2 4 6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "make_point_m", | ||
"type": "function", | ||
"description": "Creates a point geometry from an x, y coordinate and m value.", | ||
"arguments": [ | ||
{"arg":"x","description":"x coordinate of point"}, | ||
{"arg":"y","description":"y coordinate of point"}, | ||
{"arg":"m","description":"m value of point"} ], | ||
"examples": [ { "expression":"geom_to_wkt(make_point_m(2,4,6))", "returns":"'PointM (2 4 6)'"} ] | ||
} |
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,8 @@ | ||
{ | ||
"name": "z", | ||
"type": "function", | ||
"description": "Returns the z coordinate of a point geometry.", | ||
"arguments": [ {"arg":"geom","description":"a point geometry"}], | ||
"examples": [ { "expression":"z( geom_from_wkt( 'POINTZ(2 5 7)' ) )", "returns":"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
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