ST_OrientedEnvelope, which minimizes the area of the enclosing rectangle, this function minimizes the width (shortest side). The result may differ from ST_OrientedEnvelope for geometries where the minimum-area and minimum-width orientations diverge (see example below). Degenerate inputs may result in a Point or LineString being returned.
Signatures
Parameters
The input geometry.
Return type
The resulting geometry.
Examples
For a right triangle,ST_MinimumWidthRectangle tilts the rectangle along the hypotenuse to minimize the width, while ST_OrientedEnvelope keeps it axis-aligned to minimize area:
ST_OrientedEnvelope on the same input:

