PostGIS

ST_MakeEnvelope

Prev

8.3. Geometry Constructors

Next

Name

ST_MakeEnvelope — Creates a rectangular Polygon from minimum and maximum coordinates.

Synopsis

geometry +`*`+ST_MakeEnvelope*(`float `xmin, float ymin, float xmax, float ymax, integer srid=unknown`)`;

Description

Creates a rectangular Polygon from the minimum and maximum values for X and Y. Input values must be in the spatial reference system specified by the SRID. If no SRID is specified the unknown spatial reference system (SRID 0) is used.

Availability: 1.5

Enhanced: 2.0: Ability to specify an envelope without specifying an SRID was introduced.

Example: Building a bounding box polygon

SELECT ST_AsText( ST_MakeEnvelope(10, 10, 11, 11, 4326) );

st_asewkt
-----------
POLYGON((10 10, 10 11, 11 11, 11 10, 10 10))

See Also

Prev

Up

Next

ST_LineFromMultiPoint

Home

ST_MakeLine