> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_AsEWKT

Return the Extended Well-Known Text representation of a geometry.
EWKT is an extended version of WKT which includes the SRID of the geometry.
The format originated in PostGIS but is supported by many GIS tools.
If the geometry is lacking SRID a WKT format is produced.
[See ST\_SetSRID](/reference/wherobots-db/geometry-data/spatial-reference/ST_SetSRID)
It will support M coordinate if present since v1.5.0.

## Signatures

```sql theme={"system"}
ST_AsEWKT (A: Geometry)
```

## Parameters

<ParamField body="A" type="Geometry" required>
  The input geometry.
</ParamField>

## Return type

<ResponseField type="String">
  A string representation.
</ResponseField>

## Examples

```sql theme={"system"}
SELECT ST_AsEWKT(ST_SetSrid(ST_GeomFromWKT('POLYGON((0 0,0 1,1 1,1 0,0 0))'), 4326))
```

```
SRID=4326;POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))
```

```sql theme={"system"}
SELECT ST_AsEWKT(ST_MakePointM(1.0, 1.0, 1.0))
```

```
POINT M(1 1 1)
```

```sql theme={"system"}
SELECT ST_AsEWKT(ST_MakePoint(1.0, 1.0, 1.0, 1.0))
```

```
POINT ZM(1 1 1 1)
```
