PostgreSQL circle(box) Function

The PostgreSQL circle(box) function returns the smallest circle that encloses the specified rectangle.

circle(box) Syntax

This is the syntax of the PostgreSQL circle(box) function:

circle(box) -> circle

Parameters

box

Required. A box. For example: box '(1,1),(0,0)'.

Return value

The PostgreSQL circle(box) function returns the smallest circle that encloses the specified rectangle.

circle(box) Examples

The following statement shows how to use the PostgreSQL circle(box) function to return the smallest circle that encloses the box box '(1,1),(0,0)'.

SELECT circle(box '(1,1),(0,0)');
             circle
--------------------------------
 <(0.5,0.5),0.7071067811865476>