This topic describes the ST_MakeBox2D function. This function constructs a Box2D object by using a point in the lower-left corner and a point in the upper-right corner.

Syntax

box2d  ST_MakeBox2D(geometry  pointLowLeft , geometry  pointUpRight);

Parameters

Parameter Description
pointLowLeft The point in the lower-left corner.
pointUpRight The point in the upper-right corner.

Description

This function is suitable for range queries.

Examples

SELECT ST_MakeBox2D(ST_Point(115, 39), ST_Point(116, 40));
    st_makebox2d
--------------------
 BOX(115 39,116 40)
(1 row)