Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Returns the bounding rectangle for the geometry value.
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.
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()