Skip to main content
Construct a Geography from WKT. If SRID is not set, it defaults to 0 (unknown).

Signatures

ST_GeogFromWKT (Wkt: String)
ST_GeogFromWKT (Wkt: String, srid: Integer)

Parameters

Wkt
String
required
A Well-Known Text (WKT) representation of a geometry.
srid
Integer
Spatial Reference Identifier.

Return type

The computed result.

Examples

SELECT ST_GeogFromWKT('LINESTRING (1 2, 3 4, 5 6)')
LINESTRING (1 2, 3 4, 5 6)
SELECT ST_AsEWKT(ST_GeogFromWKT('LINESTRING (1 2, 3 4, 5 6)', 4326))
SRID=4326; LINESTRING (1 2, 3 4, 5 6)