Zum Inhalt springen

Wandelt ein GEOMETRY-Objekt in eine Darstellung im Format WKT (Well-Known Text) um.

ST_ASWKT(<geometry>)
Argumente Beschreibung
<geometry> Das Argument muss ein Ausdruck vom Typ GEOMETRY sein.

String.

SELECT
ST_ASWKT(
ST_GEOMETRYFROMWKT(
'SRID=4326;LINESTRING(400000 6000000, 401000 6010000)'
)
) AS pipeline_wkt;
┌───────────────────────────────────────────┐
│ pipeline_wkt │
├───────────────────────────────────────────┤
│ LINESTRING(400000 6000000,401000 6010000) │
└───────────────────────────────────────────┘
SELECT
ST_ASTEXT(
ST_GEOMETRYFROMWKT(
'SRID=4326;POINT(-122.35 37.55)'
)
) AS pipeline_wkt;
┌──────────────────────┐
│ pipeline_wkt │
├──────────────────────┤
│ POINT(-122.35 37.55) │
└──────────────────────┘