Skip to content
πŸŽ‰ SedonaDB 0.4.0 is out now! πŸ—ΊοΈ Python DataFrame API, R dplyr, Geography support & GPU-accelerated spatial joins. Read the release blog β†’

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.

ST_OrientedEnvelope

Format: ST_OrientedEnvelope(geometry: Geometry)

Return type: Geometry

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))