ST_Envelope

Determine the bounding box of a geometry.

Syntax

ST_Envelope(geo);
geo
The input geometry.

Type: ST_GEOMETRY(ANY)

Returns

A value of type ST_GEOMETRY(200) that contains the geometry that forms the bounding box, or envelope, of the input geometry.

Examples

inza..ST_AsText(inza..ST_Envelope(inza..ST_WKTToSQL('LINE STRING (0 0, 1 -1, 2 2)')));

ST_ASTEXT
-----------
POLYGON ((0 -1, 0 2, 2 2, 2 -1, 0 -1))
(1 row)