Description: Area calculation
Return type: double precision
Example:
1 2 3 4 5 | SELECT area(box '((0,0),(1,1))') AS RESULT; result -------- 1 (1 row) |
Description: Figure center calculation
Return type: point
Example:
1 2 3 4 5 | SELECT center(box '((0,0),(1,2))') AS RESULT; result --------- (0.5,1) (1 row) |
Description: Circle diameter calculation
Return type: double precision
Example:
1 2 3 4 5 | SELECT diameter(circle '((0,0),2.0)') AS RESULT; result -------- 4 (1 row) |
Description: Vertical size of box
Return type: double precision
Example:
1 2 3 4 5 | SELECT height(box '((0,0),(1,1))') AS RESULT; result -------- 1 (1 row) |
Description: A closed path?
Return type: boolean
Example:
1 2 3 4 5 | SELECT isclosed(path '((0,0),(1,1),(2,0))') AS RESULT; result -------- t (1 row) |
Description: An open path?
Return type: boolean
Example:
1 2 3 4 5 | SELECT isopen(path '[(0,0),(1,1),(2,0)]') AS RESULT; result -------- t (1 row) |
Description: Length calculation
Return type: double precision
Example:
1 2 3 4 5 | SELECT length(path '((-1,0),(1,0))') AS RESULT; result -------- 4 (1 row) |
Description: Number of points in path
Return type: int
Example:
1 2 3 4 5 | SELECT npoints(path '[(0,0),(1,1),(2,0)]') AS RESULT; result -------- 3 (1 row) |
Description: Number of points in polygon
Return type: int
Example:
1 2 3 4 5 | SELECT npoints(polygon '((1,1),(0,0))') AS RESULT; result -------- 2 (1 row) |
Description: Converts path to closed.
Return type: path
Example:
1 2 3 4 5 | SELECT pclose(path '[(0,0),(1,1),(2,0)]') AS RESULT; result --------------------- ((0,0),(1,1),(2,0)) (1 row) |
Description: Converts path to open.
Return type: path
Example:
1 2 3 4 5 | SELECT popen(path '((0,0),(1,1),(2,0))') AS RESULT; result --------------------- [(0,0),(1,1),(2,0)] (1 row) |
Description: Circle diameter calculation
Return type: double precision
Example:
1 2 3 4 5 | SELECT radius(circle '((0,0),2.0)') AS RESULT; result -------- 2 (1 row) |
Description: Horizontal size of box
Return type: double precision
Example:
1 2 3 4 5 | SELECT width(box '((0,0),(1,1))') AS RESULT; result -------- 1 (1 row) |