ST_MBR

Determine the minimum bounding rectangle (MBR), sometimes called the bounding box, of a geometry.

ST_MBR is exactly the same as ST_Envelope.

Syntax

ST_MBR(geo);
geo
The input geometry.

Type: ST_GEOMETRY(ANY)

Returns

A value of type VARCHAR(200) that contains a rectangular polygon geometry that describes the bounding box of the input geometry.

Examples

SELECT inza..ST_AsText(inza..ST_MBR(inza..ST_WKTToSQL('POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))')));
 
ST_ASTEXT
-----------
POLYGON ((10 10, 10 20, 20 20, 20 10, 10 10))
(1 row)
SELECT inza..ST_AsText(inza..ST_MBR(inza..ST_WKTToSQL('POINT (0 1)')));

ST_ASTEXT
-----------
POLYGON ((-1.9999788491987e-09 0.99999999800002,
1.9999788491987e-09 0.99999999800002, 1.9999788491987e-09
1.000000002, -1.9999788491987e-09 1.000000002,
-1.9999788491987e-09 0.99999999800002))
(1 row)