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: VARCHAR(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 ((0 1, 0 1, 0 1, 0 1, 0 1))
(1 row)