📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

ST_GEOGRAPHYFROMWKT



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.

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) │ └──────────────────────┘

Was this page helpful?