ST_DIMENSION (Lakehouse v1)
Renvoie la dimension d’un objet de géométrie. La dimension d’un objet GEOMETRY est la suivante :
| Type d’objet géospatial | Dimension |
|---|---|
| Point / MultiPoint | 0 |
| LineString / MultiLineString | 1 |
| Polygon / MultiPolygon | 2 |
Syntaxe SQL
Section intitulée « Syntaxe SQL »ST_DIMENSION(<geometry>)Arguments
Section intitulée « Arguments »| Arguments | Description |
|---|---|
<geometry> |
L’argument doit être une expression de type GEOMETRY. |
Type de retour
Section intitulée « Type de retour »UInt8.
Exemples SQL
Section intitulée « Exemples SQL »SELECT ST_DIMENSION( ST_GEOMETRYFROMWKT( 'POINT(-122.306100 37.554162)' ) ) AS pipeline_dimension;
┌────────────────────┐│ pipeline_dimension │├────────────────────┤│ 0 │└────────────────────┘
SELECT ST_DIMENSION( ST_GEOMETRYFROMWKT( 'LINESTRING(-124.20 42.00, -120.01 41.99)' ) ) AS pipeline_dimension;
┌────────────────────┐│ pipeline_dimension │├────────────────────┤│ 1 │└────────────────────┘
SELECT ST_DIMENSION( ST_GEOMETRYFROMWKT( 'POLYGON((-124.20 42.00, -120.01 41.99, -121.1 42.01, -124.20 42.00))' ) ) AS pipeline_dimension;
┌────────────────────┐│ pipeline_dimension │├────────────────────┤│ 2 │└────────────────────┘