ST_LENGTH (Lakehouse v1)
Renvoie la longueur euclidienne des LineString d’un objet GEOMETRY.
Syntaxe SQL
Section intitulée « Syntaxe SQL »ST_LENGTH(<geometry>)Arguments
Section intitulée « Arguments »| Arguments | Description |
|---|---|
<geometry> |
L’argument doit être une expression de type GEOMETRY contenant des linestrings. |
Type de retour
Section intitulée « Type de retour »Double.
Exemples SQL
Section intitulée « Exemples 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 │└─────────┘