VeloDB Cloud
SQL Manual
Functions
spatial-functions
ST_Polygon,ST_PolyFromText,ST_PolygonFromText

ST_Polygon,ST_PolyFromText,ST_PolygonFromText

Description

Syntax:

GEOMETRY ST_Polygon (VARCHAR wkt)

This function converts a WKT (Well Known Text) to a polygon memory representation.

Example

mysql> 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))                          |
+------------------------------------------------------------------+

Keywords

ST_POLYGON,ST_POLYFROMTEXT,ST_POLYGONFROMTEXT,ST,POLYGON,POLYFROMTEXT,POLYGONFROMTEXT