STGeomFromTextPOLYGON
STGeomFromTextPOLYGON is a spatial function used to construct polygon geometry objects from Well-Known Text (WKT) representations. In implementations that provide a polygon-focused variant, STGeomFromTextPOLYGON parses a WKT POLYGON string and returns a polygon geometry, optionally assigning it a spatial reference system identifier (SRID). The function is often described as a polygon-specific wrapper or alias around a more general WKT-to-geometry converter such as STGeomFromText or ST_GeomFromText.
STGeomFromTextPOLYGON(wkt, srid)
- wkt: a string containing a POLYGON in WKT format, for example POLYGON((x1 y1, x2 y2, ..., xn
- srid: an optional integer specifying the Spatial Reference Identifier. If omitted, the function may assign a
The function returns a polygon geometry corresponding to the input WKT. If the WKT is malformed or
STGeomFromTextPOLYGON is not universal across all spatial databases; many systems provide a generic STGeomFromText (or ST_GeomFromText)
STGeomFromText, ST_GeomFromText, WKT, POLYGON, SRID, spatial databases.