ST_MAKEPOLYGON (Lakehouse v1)
Constructs a GEOMETRY object that represents a Polygon without holes. The function uses the specified LineString as the outer loop.
SQL Syntax
Section titled “SQL Syntax”ST_MAKEPOLYGON(<geometry>)Aliases
Section titled “Aliases”Arguments
Section titled “Arguments”| Arguments | Description |
|---|---|
<geometry> | The argument must be an expression of type GEOMETRY. |
Return Type
Section titled “Return Type”Geometry.
SQL Examples
Section titled “SQL Examples”SELECT ST_MAKEPOLYGON( ST_GEOMETRYFROMWKT( 'LINESTRING(0.0 0.0, 1.0 0.0, 1.0 2.0, 0.0 2.0, 0.0 0.0)' ) ) AS pipeline_polygon;
┌────────────────────────────────┐│ pipeline_polygon │├────────────────────────────────┤│ POLYGON((0 0,1 0,1 2,0 2,0 0)) │└────────────────────────────────┘