ST_GeomFromText — Return a geometric object given its Well-known text Representation.
geometry ST_GeomFromText(
varchar WKT, integer
SRID)
;
geometry ST_GeomFromText(
varchar WKT)
;
The GeomFromText function takes a geometry textual representation and a Spatial Reference System ID (SRID) and creates an instance of the appropriate Geometry Type. If the SRID is not provides it defaults to -1.
The return type of the GeomFromText function is the Geometry supertype. For construction of a geometric object to be stored in columns restricted to a particular subtype, use the type-specific construction function.
ST_AsText is the reverse of ST_GeomFromText. |
2D | 3D | M |
---|---|---|
OGC SFS for SQL. 1.1 (1999) | OGC SFS for SQL. 1.1.0 (2005) | OGC SFS for SQL. 1.2.0 (2006) | SQL-MM Part 3 |
---|---|---|---|
3.2.6.2 | 7.2.6.1 | - | 5.1.40 |