Returns the minimum bounding circle of a geometry object as a polygon. By default, 48 segments are used to approximate a quarter circle.
Syntax
geometry ST_MinimumBoundingCircle(geometry geomA, integer numSegsPerQtCirc);Parameters
| Parameter | Description |
|---|---|
| geomA | The input geometry object. |
| numSegsPerQtCirc | The number of segments used to approximate a quarter circle. Default value: 48. |
Description
A higher value of
numSegsPerQtCircproduces a more accurate result but may reduce performance.ST_MinimumBoundingCirclesupports MULTI and GeometryCollection objects in most cases. It is not an aggregate function. To get the minimum bounding circle of a set of geometry objects, combine it withST_Collect:ST_MinimumBoundingCircle(ST_Collect(somepointfield)).
Examples
The following example compares the minimum bounding circle with the input geometry object:
select ST_CurveToLine(ST_MinimumBoundingCircle(g)),g from (select 'POLYGON((0 0,1 0,1 1,0 1,0 0))'::geometry as g) as t
该文章对您有帮助吗?