Returns the bounding rectangle for the geometry value.
geometry-expression.ST_Envelope()
Returns a polygon that is the bounding rectangle for the geometry-expression.
The spatial reference system identifier of the result is the same as the spatial reference system of the geometry-expression.
The ST_Envelope method constructs a polygon that is an axis-aligned bounding rectangle for the geometry-expression. The envelope covers the entire geometry, and it can be used as a simple approximation for the geometry.
5.1.15
The following example returns the result Polygon ((0 0, 1 0, 1 4, 0 4, 0 0)).
SELECT Shape.ST_Envelope() FROM SpatialShapes WHERE ShapeID = 6
The following returns the result Polygon ((0 0, 1 0, 1 1, 0 1, 0 0)).
SELECT NEW ST_LineString('LineString(0 0, 1 1)').ST_Envelope()