Name

ST_MakeBox2D — Creates a Box2d defined by the lower left point and the upper right point.

Synopsis

geometry ST_MakeBox2D(bytea point, bytea point);

Alias

MakeBox2D

Description

Creates a Box2d defined by the lower left point and the upper right point.

Coordinate Dimensions
2D3DM
--
Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006)SQL-MM Part 3
----

Examples

--EWKT of the Box2D
SELECT ST_AsEWKT(ST_MakeBox2D(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(10 10)')));
--Result
POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))

Related functions

ST_MakeBox3D