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

Returns a geometry expanded from the bounding box of the input. The expansion can be specified in two ways:

1. By individual axis using `deltaX`, `deltaY`, or `deltaZ` parameters.
2. Uniformly across all axes using the `uniformDelta` parameter.

<Note>
  Things to consider when using this function:

  1. The `uniformDelta` parameter expands Z dimensions for XYZ geometries; otherwise, it only affects XY dimensions.
  2. For XYZ geometries, specifying only `deltaX` and `deltaY` will preserve the original Z dimension.
  3. If the input geometry has an M dimension then using this function will drop the said M dimension.
</Note>

<img src="https://mintcdn.com/wherobots/fqh3gPDE0J25Lra_/images/sql-functions/ST_Expand/ST_Expand.svg?fit=max&auto=format&n=fqh3gPDE0J25Lra_&q=85&s=1503261db00beffa14bc59231eedc097" alt="ST_Expand" width="400" height="160" data-path="images/sql-functions/ST_Expand/ST_Expand.svg" />

## Signatures

```sql theme={"system"}
ST_Expand(geometry: Geometry, uniformDelta: Double)
```

```sql theme={"system"}
ST_Expand(geometry: Geometry, deltaX: Double, deltaY: Double)
```

```sql theme={"system"}
ST_Expand(geometry: Geometry, deltaX: Double, deltaY: Double, deltaZ: Double)
```

## Parameters

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

<ParamField body="deltaX" type="Double">
  The delta x value.
</ParamField>

<ParamField body="deltaY" type="Double">
  The delta y value.
</ParamField>

<ParamField body="deltaZ" type="Double">
  The delta z value.
</ParamField>

<ParamField body="uniformDelta" type="Double">
  The uniform delta value.
</ParamField>

## Return type

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

## Example

```sql theme={"system"}
SELECT ST_Expand(
        ST_GeomFromWKT('POLYGON Z((50 50 1, 50 80 2, 80 80 3, 80 50 2, 50 50 1))'),
        10
   )
```

```
POLYGON Z((40 40 -9, 40 90 -9, 90 90 13, 90 40 13, 40 40 -9))
```
