ST_POINTN(Lakehouse v1)
返回 LineString 中指定索引处的 Point。
SQL 语法
Section titled “SQL 语法”ST_POINTN(<geometry>, <index>)| 参数 | 说明 |
|---|---|
<geometry> |
参数必须是表示 LineString 的 GEOMETRY 类型表达式。 |
<index> |
要返回的 Point 的索引。 |
Geometry。
SQL 示例
Section titled “SQL 示例”SELECT ST_POINTN( ST_GEOMETRYFROMWKT( 'LINESTRING(1 1, 2 2, 3 3, 4 4)' ), 1 ) AS pipeline_pointn;
┌─────────────────┐│ pipeline_pointn │├─────────────────┤│ POINT(1 1) │└─────────────────┘
SELECT ST_POINTN( ST_GEOMETRYFROMWKT( 'LINESTRING(1 1, 2 2, 3 3, 4 4)' ), -2 ) AS pipeline_pointn;
┌─────────────────┐│ pipeline_pointn │├─────────────────┤│ POINT(3 3) │└─────────────────┘