ST_Envelope()

TL;DR

Use ST_Envelope() to return a geometry’s bounding envelope.

Returns a geometry’s bounding envelope.

Syntax

ST_Envelope(geom)

Arguments

Argument

Description

geom

A GEOMETRY or GEOMETRY32 value.

Return Value

Returns the same geometry precision type as geom.

Usage Notes

Examples

DROP DATABASE IF EXISTS geo_accessor_demo;
CREATE DATABASE geo_accessor_demo;
USE geo_accessor_demo;
SELECT ST_AsText(ST_Envelope(ST_GeomFromText('LINESTRING(1 2,3 4,0 5)'))) AS envelope;
DROP DATABASE geo_accessor_demo;

See Also

ST_Centroid, ST_Boundary