Name

ST_MakeBox3D — Creates a Box3d defined by the lower left point and the upper right point.

Synopsis

geometry ST_MakeBox3D(bytea point, bytea point);

Alias

MakeBox3D

Description

Creates a Box3d 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

SELECT ST_AsEWKT(ST_MakeBox3D(ST_PointFromText('POINT(0 0 10 2)'),ST_PointFromText('POINT(10 10 10 4)'))) As BB;
--Result
BB  
POLYGON ((0 0 10, 0 10 10, 10 10 10, 10 0 10, 0 0 10))

--Using ST_MakePoint
SELECT ST_AsText(ST_MakeBox3D(ST_MakePoint(0, 0, 8),ST_MakePoint(10 ,10, 8))) As box3d;

--Result
BOX3D  
POLYGON ((0 0 8, 0 10 8, 10 10 8, 10 0 8, 0 0 8))

Related functions

ST_MakeBox2D