ST_POINTN (Lakehouse v1)
Devolve um Point num índice especificado de uma LineString.
Sintaxe SQL
Seção intitulada “Sintaxe SQL”ST_POINTN(<geometry>, <index>)Argumentos
Seção intitulada “Argumentos”| Argumentos | Descrição |
|---|---|
<geometry> |
O argumento tem de ser uma expressão do tipo GEOMETRY que represente uma LineString. |
<index> |
O índice do Point a devolver. |
Tipo de retorno
Seção intitulada “Tipo de retorno”Geometry.
Exemplos de SQL
Seção intitulada “Exemplos de 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) │└─────────────────┘