Skip to main content

ST_POLYGON,ST_POLYFROMTEXT,ST_POLYGONFROMTEXT

Description​

Convert a WKT (Well Known Text) to the corresponding polygonal memory form

Syntax​

ST_Polygon( <wkt>)

Parameters​

ParametersInstructions
<wkt>A POLYGON generated by the polygon function

Return Value​

Memory form of polygon

Examples​

SELECT ST_AsText(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"));
+------------------------------------------------------------------+
| st_astext(st_polygon('POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))')) |
+------------------------------------------------------------------+
| POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0)) |
+------------------------------------------------------------------+