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

Buffers a geometry at multiple distances in a single call and returns a `GeometryCollection` whose parts are ordered by ascending buffer distance. This is the multi-distance counterpart to [ST\_Buffer](/reference/wherobots-db/geometry-data/processing/ST_Buffer); each individual buffer is computed with the same semantics as `ST_Buffer`, so the optional `useSpheroid` flag and buffer-style `parameters` string behave identically.

The second argument is an array of buffer distances (integers or doubles), supplied either as an array literal or as a column of array type.

The `concentric` argument controls how the buffers are combined:

* `concentric = true` (default): the parts are disjoint annular rings ("donuts"). The innermost part is the solid buffer at the smallest distance, and each outer part is the full buffer at that distance with the next-smaller buffer subtracted. Because buffering is monotonic (`ST_Buffer(g, d1)` is contained in `ST_Buffer(g, d2)` when `d1 <= d2`), the rings never overlap.
* `concentric = false`: the parts are the overlapping full buffers at each distance, i.e. a stack of `ST_Buffer` results.
* Negative values are supported. Fully decimated negative buffers return empty geometries.

Distances are sorted ascending and de-duplicated before processing, so the resulting parts correspond one-to-one with the distinct distances from innermost to outermost regardless of the order they were supplied in. The SRID of the input geometry is preserved on the result.

<Note>
  A `null` input geometry returns `null`. An empty or `null` distances array returns an empty `GeometryCollection`.
</Note>

## Signatures

```sql theme={"system"}
ST_MultiRingBuffer (geometry: Geometry, distances: Array<Double>)
```

```sql theme={"system"}
ST_MultiRingBuffer (geometry: Geometry, distances: Array<Double>, concentric: Boolean)
```

```sql theme={"system"}
ST_MultiRingBuffer (geometry: Geometry, distances: Array<Double>, concentric: Boolean, useSpheroid: Boolean)
```

```sql theme={"system"}
ST_MultiRingBuffer (geometry: Geometry, distances: Array<Double>, concentric: Boolean, useSpheroid: Boolean, bufferStyleParameters: String)
```

## Parameters

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

<ParamField body="distances" type="Array<Double>" required>
  The buffer distances. Sorted ascending and de-duplicated before processing.
</ParamField>

<ParamField body="concentric" type="Boolean">
  `true` (default) for disjoint annular rings; `false` for overlapping full buffers.
</ParamField>

<ParamField body="useSpheroid" type="Boolean">
  Whether to use spheroidal distance calculation, as in `ST_Buffer`. When `true`, distances are interpreted as meters.
</ParamField>

<ParamField body="bufferStyleParameters" type="String">
  The buffer style parameters value, as in `ST_Buffer` (e.g. `quad_segs=8 endcap=round`).
</ParamField>

## Return type

<ResponseField type="Geometry">
  A `GeometryCollection` of buffer rings ordered by ascending distance.
</ResponseField>

## Examples

Concentric rings (default) — three disjoint annuli ordered from innermost to outermost:

```sql theme={"system"}
SELECT ST_MultiRingBuffer(ST_GeomFromWKT('POINT(0 0)'), ARRAY(10, 20, 30))
```

Output:

```
GEOMETRYCOLLECTION (POLYGON ((10 0, ...)), POLYGON ((20 0, ..., 10 0, ...)), POLYGON ((30 0, ..., 20 0, ...)))
```

Overlapping full buffers via `concentric = false`:

```sql theme={"system"}
SELECT ST_MultiRingBuffer(ST_GeomFromWKT('POINT(0 0)'), ARRAY(10.0, 20.0), false)
```

Passing with `concentric`, `useSpheroid`, the `ST_Buffer` buffer style string:

```sql theme={"system"}
SELECT ST_MultiRingBuffer(ST_GeomFromWKT('POINT(0 0)'), ARRAY(5.0, 10.0), true, false, 'quad_segs=2')
```
