> ## 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_GeogFromText

Constructs a Geography object from a WKT (Well-Known Text) string. If SRID is not set, it defaults to 0 (unknown). This is the geography equivalent of `ST_GeomFromText`.

## Signatures

```sql theme={"system"}
ST_GeogFromText(wkt: String)
```

```sql theme={"system"}
ST_GeogFromText(wkt: String, srid: Integer)
```

## Parameters

<ParamField body="wkt" type="String" required>
  A Well-Known Text (WKT) representation of a geometry.
</ParamField>

<ParamField body="srid" type="Integer">
  Spatial Reference Identifier. Defaults to 0 if not specified.
</ParamField>

## Return type

<ResponseField type="Geography">
  The constructed geography object.
</ResponseField>

## Examples

```sql theme={"system"}
SELECT ST_GeogFromText('POINT (-122.4194 37.7749)')
```

```
POINT (-122.4194 37.7749)
```

```sql theme={"system"}
SELECT ST_AsEWKT(ST_GeogFromText('LINESTRING (1 2, 3 4, 5 6)', 4326))
```

```
SRID=4326; LINESTRING (1 2, 3 4, 5 6)
```
