Skip to main content

ST_GEOMETRYFROMWKT

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 GEOMETRY.

Syntax​

ST_GEOMETRYFROMWKT(<string>, [<srid>])

Aliases​

Arguments​

ArgumentsDescription
<string>The argument must be a string expression in WKT or EWKT format.
<srid>The integer value of the SRID to use.

Return Type​

Geometry.

Examples​

SELECT
ST_GEOMETRYFROMWKT(
'POINT(1820.12 890.56)'
) AS pipeline_geometry;

┌───────────────────────┐
│ pipeline_geometry │
├───────────────────────┤
│ POINT(1820.12 890.56) │
└───────────────────────┘

SELECT
ST_GEOMETRYFROMWKT(
'POINT(1820.12 890.56)', 4326
) AS pipeline_geometry;

┌─────────────────────────────────┐
│ pipeline_geometry │
│ Geometry │
├─────────────────────────────────┤
│ SRID=4326;POINT(1820.12 890.56) │
└─────────────────────────────────┘
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