This topic describes the ST_OrientedEnvelope function. This function returns the smallest rotated rectangle that encloses the input geometry object.
Syntax
geometry ST_OrientedEnvelope(geometry geom);
Parameters
Parameter | Description |
---|---|
geom | The geometry object that you want to specify. |
Description
- The number of smallest rotated rectangles of the input geometry object may be more than one.
- In the case of degenerate input, this function may return a point object or LineString object.
Examples
Comparison between the input geometry object and one of the smallest rotated rectangles:
select ST_OrientedEnvelope(g),g from (select 'POLYGON((0 0,1 0,1 1,0 1,0 0),(3 3,4 3,4 4,3 4,3 3))'::geometry as g) as t;