ST_LENGTH (Lakehouse v1)
Devuelve la longitud euclidiana de los LineString de un objeto GEOMETRY.
Sintaxis de SQL
Sección titulada «Sintaxis de SQL»ST_LENGTH(<geometry>)Argumentos
Sección titulada «Argumentos»| Argumentos | Descripción |
|---|---|
<geometry> |
El argumento debe ser una expresión de tipo GEOMETRY que contenga linestrings. |
Tipo de valor devuelto
Sección titulada «Tipo de valor devuelto»Doble.
Ejemplos de SQL
Sección titulada «Ejemplos de SQL»SELECT ST_LENGTH(TO_GEOMETRY('POINT(1 1)')) AS length
┌─────────┐│ length │├─────────┤│ 0 │└─────────┘
SELECT ST_LENGTH(TO_GEOMETRY('LINESTRING(0 0, 1 1)')) AS length
┌─────────────┐│ length │├─────────────┤│ 1.414213562 │└─────────────┘
SELECT ST_LENGTH( TO_GEOMETRY('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))') ) AS length
┌─────────┐│ length │├─────────┤│ 0 │└─────────┘