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

Returns the minimum-area rotated rectangle enclosing a geometry. The rectangle may be rotated relative to the coordinate axes. Degenerate inputs may result in a Point or LineString being returned.

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

## Signatures

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

## Parameters

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

## Return type

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

## Example

```sql theme={"system"}
SELECT ST_OrientedEnvelope(ST_GeomFromWKT('POLYGON ((0 0, 1 0, 5 4, 4 4, 0 0))'))
```

```
POLYGON ((0 0, 4.5 4.5, 5 4, 0.5 -0.5, 0 0))
```
