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

Constructs a Geography Collection from a WKT (Well-Known Text) string. If SRID is not set, it defaults to 0 (unknown). The input WKT must represent a geometry collection.

## Signatures

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

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

## Parameters

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

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

## Return type

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

## Examples

```sql theme={"system"}
SELECT ST_GeogCollFromText('GEOMETRYCOLLECTION (POINT (1 2), LINESTRING (1 2, 3 4))')
```

```
GEOMETRYCOLLECTION (POINT (1 2), LINESTRING (1 2, 3 4))
```

```sql theme={"system"}
SELECT ST_AsEWKT(ST_GeogCollFromText('GEOMETRYCOLLECTION (POINT (1 2), POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0)))', 4326))
```

```
SRID=4326; GEOMETRYCOLLECTION (POINT (1 2), POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0)))
```
