Skip to main content

ST_ASEWKT

Introduced or updated: v1.2.436

Converts a GEOMETRY object into a EWKT(extended well-known-text) format representation.

Syntax

ST_ASEWKT(<geometry>)

Arguments

ArgumentsDescription
<geometry>The argument must be an expression of type GEOMETRY.

Return Type

String.

Examples

SELECT
ST_ASEWKT(
ST_GEOMETRYFROMWKT(
'SRID=4326;LINESTRING(400000 6000000, 401000 6010000)'
)
) AS pipeline_ewkt;

┌─────────────────────────────────────────────────────┐
│ pipeline_ewkt │
├─────────────────────────────────────────────────────┤
│ SRID=4326;LINESTRING(400000 6000000,401000 6010000)
└─────────────────────────────────────────────────────┘

SELECT
ST_ASEWKT(
ST_GEOMETRYFROMWKT(
'SRID=4326;POINT(-122.35 37.55)'
)
) AS pipeline_ewkt;

┌────────────────────────────────┐
│ pipeline_ewkt │
├────────────────────────────────┤
│ SRID=4326;POINT(-122.35 37.55)
└────────────────────────────────┘
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today