ST_POLYGON
Description
Convert a WKT (Well Known Text) to the corresponding polygonal memory form
Alias
- ST_POLYGONFROMTEXT
- ST_POLYFROMTEXT
Syntax
ST_POLYGON( <wkt>)
Parameters
Parameters | Instructions |
---|---|
<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)) |
+------------------------------------------------------------------+