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

Returns MultiGeometry object based on geometry column/s or array with geometries

<img src="https://mintcdn.com/wherobots/fqh3gPDE0J25Lra_/images/sql-functions/ST_Collect/ST_Collect.svg?fit=max&auto=format&n=fqh3gPDE0J25Lra_&q=85&s=9aae8d662b1ba0f5828ac4ebdcc9db2e" alt="ST_Collect" width="500" height="300" data-path="images/sql-functions/ST_Collect/ST_Collect.svg" />

## Signatures

```sql theme={"system"}
ST_Collect(*geom: Geometry)
```

```sql theme={"system"}
ST_Collect(geom: ARRAY[Geometry])
```

## Parameters

<ParamField body="geom" type="Geometry" required>
  One or more geometry values to collect. Can be passed as individual arguments (variadic) or as an array of geometries.
</ParamField>

## Return type

<ResponseField type="Geometry">
  The resulting geometry.
</ResponseField>

## Examples

```sql theme={"system"}
SELECT ST_Collect(
    ST_GeomFromText('POINT(21.427834 52.042576573)'),
    ST_GeomFromText('POINT(45.342524 56.342354355)')
) AS geom
```

```
+---------------------------------------------------------------+
|geom                                                           |
+---------------------------------------------------------------+
|MULTIPOINT ((21.427834 52.042576573), (45.342524 56.342354355))|
+---------------------------------------------------------------+
```

```sql theme={"system"}
SELECT ST_Collect(
    Array(
        ST_GeomFromText('POINT(21.427834 52.042576573)'),
        ST_GeomFromText('POINT(45.342524 56.342354355)')
    )
) AS geom
```

```
+---------------------------------------------------------------+
|geom                                                           |
+---------------------------------------------------------------+
|MULTIPOINT ((21.427834 52.042576573), (45.342524 56.342354355))|
+---------------------------------------------------------------+
```
