> ## 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_MinimumWidthRectangle (Python)

> Return the minimum-width rotated rectangle enclosing a geometry.

Return the minimum-width rotated rectangle enclosing a geometry.

Unlike ST\_OrientedEnvelope which minimizes area, this function minimizes
the width (shortest side) of the enclosing rectangle.

SQL reference: [`ST_MinimumWidthRectangle`](/reference/wherobots-db/geometry-data/processing/ST_MinimumWidthRectangle)

## Signature

```python theme={"system"}
from sedona.spark.sql.st_functions import ST_MinimumWidthRectangle

ST_MinimumWidthRectangle(geometry: ColumnOrName) -> Column
```

## Parameters

<ParamField path="geometry" type="ColumnOrName" required>
  Geometry column to compute minimum-width rectangle for.
</ParamField>

## Returns

<ResponseField name="return" type="Column">
  Minimum-width rotated rectangle as a geometry column.
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.