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 |
|---|---|
|
A |
Return Value¶
Returns the same geometry precision type as geom.
Usage Notes¶
The source tests build an envelope for a LINESTRING and confirm that SRID metadata is preserved. Source:
test/distributed/cases/geo/geo_functions_unary.sql,geo_srid.sql.
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;