ST_GEOGRAPHYFROMWKT
Introduced or updated: v1.2.347
Parses a WKT(well-known-text) or EWKT(extended well-known-text) input and returns a value of type GEOGRAPHY.
Syntax
ST_GEOGRAPHYFROMWKT(<string>)
Aliases
Arguments
| Arguments | Description |
|---|---|
<string> | The argument must be a string expression in WKT or EWKT format. |
note
Only SRID 4326 is supported for GEOGRAPHY inputs.
Return Type
Geography.
Examples
SELECT
ST_ASWKT(
ST_GEOGRAPHYFROMWKT(
'POINT(1 2)'
)
) AS pipeline_geography;
┌────────────────────┐
│ pipeline_geography │
├────────────────────┤
│ POINT(1 2) │
└────────────────────┘
SELECT
ST_ASEWKT(
ST_GEOGRAPHYFROMWKT(
'SRID=4326;POINT(1 2)'
)
) AS pipeline_geography;
┌──────────────────────┐
│ pipeline_geography │
├──────────────────────┤
│ SRID=4326;POINT(1 2) │
└──────────────────────┘