Name

ST_MinimumBoundingCircle — Returns the minimum circle polygon that can fully contain a geometry.

Synopsis

geometry ST_MinimumBoundingCircle(bytea Geometry);

geometry ST_MinimumBoundingCircle(bytea Geometry, integer QuadrantSegments);

Alias

MinimumBoundingCircle

Description

Returns the minimum circle polygon that can fully contain a geometry. The number of segments in a quarter circle can be indicated, default value is 48.

[Note]

This method supports GeometryCollections

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_astext(ST_MinimumBoundingCircle (
  st_geomfromtext('GEOMETRYCOLLECTION (POLYGON ((2 3, 2 8, 9 8, 9 3, 2 3)),POINT (12 10))'),12));

--Result
POLYGON ((0.8967221921 6.5, 0.9489365799 7.2966376123, 1.1046863404 8.0796445342, 1.3613065521 8.8356233002, 
1.714406372 9.5516389039, 2.1579441644 10.21544012, 2.6843308746 10.8156691254, 3.28455988 11.3420558356, 
3.9483610961 11.785593628, 4.6643766998 12.1386934479, 5.4203554658 12.3953136596, 6.2033623877 12.5510634201, 
7 12.6032778079, 7.7966376123 12.5510634201, 8.5796445342 12.3953136596, 9.3356233002 12.1386934479, 10.0516389039 
11.785593628, 10.71544012 11.3420558356, 11.3156691254 10.8156691254, 11.8420558356 10.21544012, 
12.285593628 9.5516389039, 12.6386934479 8.8356233002, 12.8953136596 8.0796445342, 13.0510634201 7.2966376123, 
13.1032778079 6.5, 13.0510634201 5.7033623877, 12.8953136596 4.9203554658, 12.6386934479 4.1643766998, 12.285593628 
3.4483610961, 11.8420558356 2.78455988, 11.3156691254 2.1843308746, 10.71544012 1.6579441644, 
10.0516389039 1.214406372, 9.3356233002 0.8613065521, 8.5796445342 0.6046863404, 7.7966376123 0.4489365799, 
7 0.3967221921, 6.2033623877 0.4489365799, 5.4203554658 0.6046863404, 4.6643766998 0.8613065521, 3.9483610961 
1.214406372, 3.28455988 1.6579441644, 2.6843308746 2.1843308746, 2.1579441644 2.78455988, 1.714406372 3.4483610961, 
1.3613065521 4.1643766998, 1.1046863404 4.9203554658, 0.9489365799 5.7033623877, 0.8967221921 6.5))

Related functions

ST_ConvexHull