Skip to content
🎉 Apache Sedona 1.8.1 is now available! Check out the new features and improvements.

ST_OrientedEnvelope

Introduction: 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.

Format: ST_OrientedEnvelope(geom: Geometry)

Since: v1.8.1

SQL Example

SELECT ST_OrientedEnvelope(ST_GeomFromWKT('POLYGON ((0 0, 1 0, 5 4, 4 4, 0 0))'))

Output:

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