ST_ENVELOPE
Returns the Minimum Bounding Rectangle (MBR) for the geometry value. The result is returned as a Polygon defined by the corner points.
Syntax
ST_ENVELOPE(g)
ENVELOPE(g)Description
POLYGON((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))Examples
SELECT AsText(ST_ENVELOPE(GeomFromText('LineString(1 1,4 4)')));
+----------------------------------------------------------+
| AsText(ST_ENVELOPE(GeomFromText('LineString(1 1,4 4)'))) |
+----------------------------------------------------------+
| POLYGON((1 1,4 1,4 4,1 4,1 1)) |
+----------------------------------------------------------+Last updated
Was this helpful?

