Skip to main content

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

ArgumentsDescription
<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)
└──────────────────────┘
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today