云数据库 GAUSSDB-几何函数和操作符:几何函数
几何函数
- area(object)
返回类型:double precision
示例:
1 2 3 4 5
openGauss=# SELECT area(box '((0,0),(1,1))') AS RESULT; result -------- 1 (1 row)
- center(object)
返回类型:point
示例:
1 2 3 4 5
openGauss=# SELECT center(box '((0,0),(1,2))') AS RESULT; result --------- (0.5,1) (1 row)
- diameter(circle)
返回类型:double precision
示例:
1 2 3 4 5
openGauss=# SELECT diameter(circle '((0,0),2.0)') AS RESULT; result -------- 4 (1 row)
- height(box)
返回类型:double precision
示例:
1 2 3 4 5
openGauss=# SELECT height(box '((0,0),(1,1))') AS RESULT; result -------- 1 (1 row)
- isclosed(path)
返回类型:Boolean
示例:
1 2 3 4 5
openGauss=# SELECT isclosed(path '((0,0),(1,1),(2,0))') AS RESULT; result -------- t (1 row)
- isopen(path)
返回类型:Boolean
示例:
1 2 3 4 5
openGauss=# SELECT isopen(path '[(0,0),(1,1),(2,0)]') AS RESULT; result -------- t (1 row)
- length(object)
返回类型:double precision
示例:
1 2 3 4 5
openGauss=# SELECT length(path '((-1,0),(1,0))') AS RESULT; result -------- 4 (1 row)
- npoints(path)
返回类型:int
示例:
1 2 3 4 5
openGauss=# SELECT npoints(path '[(0,0),(1,1),(2,0)]') AS RESULT; result -------- 3 (1 row)
- npoints(polygon)
返回类型:int
示例:
1 2 3 4 5
openGauss=# SELECT npoints(polygon '((1,1),(0,0))') AS RESULT; result -------- 2 (1 row)
- pclose(path)
返回类型:path
示例:
1 2 3 4 5
openGauss=# SELECT pclose(path '[(0,0),(1,1),(2,0)]') AS RESULT; result --------------------- ((0,0),(1,1),(2,0)) (1 row)
- popen(path)
返回类型:path
示例:
1 2 3 4 5
openGauss=# SELECT popen(path '((0,0),(1,1),(2,0))') AS RESULT; result --------------------- [(0,0),(1,1),(2,0)] (1 row)
- radius(circle)
返回类型:double precision
示例:
1 2 3 4 5
openGauss=# SELECT radius(circle '((0,0),2.0)') AS RESULT; result -------- 2 (1 row)
- width(box)
返回类型:double precision
示例:
1 2 3 4 5
openGauss=# SELECT width(box '((0,0),(1,1))') AS RESULT; result -------- 1 (1 row)
- GaussDB数据库函数和字符串_高斯数据库优势_新建高斯数据库_高斯协议
- GaussDB数据库函数_GaussDB函数和操作符_高斯数据库函数-华为云
- GaussDB函数_GaussDB数据库函数_高斯数据库函数_华为云
- GaussDB培训_GaussDB教程_高斯数据库培训-华为云
- GaussDB支持的函数_GaussDB函数类型解析_高斯数据库支持的函数-华为云
- 调用函数_函数调用方式_函数工作流 FunctionGraph-华为云
- GaussDB数据库函数_GaussDB介绍_高斯数据库函数
- 什么是函数工作流_函数托管计算服务_函数工作流 FunctionGraph-华为云
- 使用容器镜像部署函数_函数部署_函数工作流 FunctionGraph-华为云
- 如何使用模板创建函数_模板创建函数_函数工作流 FunctionGraph-华为云