Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature][expression] Add geometry_type function
Returns the high-level type of a geometry (Point/Line/Polygon)
- Loading branch information
1 parent
3c001de
commit 47715fe
Showing
3 changed files
with
28 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,12 @@ | ||
{ | ||
"name": "geometry_type", | ||
"type": "function", | ||
"groups": ["GeometryGroup"], | ||
"description": "Returns a string value describing the type of a geometry (Point, Line or Polygon)", | ||
"arguments": [ {"arg":"geometry","description":"a geometry"}], | ||
"examples": [ { "expression":"geometry_type( geom_from_wkt( 'LINESTRING(2 5, 3 6, 4 8)') )", "returns":"'Line'"}, | ||
{ "expression":"geometry_type( geom_from_wkt( 'MULTILINESTRING((2 5, 3 6, 4 8), (1 1, 0 0))') )", "returns":"'Line'"}, | ||
{ "expression":"geometry_type( geom_from_wkt( 'POINT(2 5)') )", "returns":"'Point'"}, | ||
{ "expression":"geometry_type( geom_from_wkt( 'POLYGON((-1 -1, 4 0, 4 2, 0 2, -1 -1))') )", "returns":"'Polygon'"} | ||
] | ||
} |
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