PostGISGeometry Processing

ST_MinimumBoundingRadius

What is ST_MinimumBoundingRadius?

ST_MinimumBoundingRadius is a PostGIS function that returns a record containing the centre point and radius of the smallest circle that encloses the input geometry. It is a lighter-weight alternative to ST_MinimumBoundingCircle when you don't need the circle geometry itself.

SQL
ST_MinimumBoundingRadius(geometry geom) → record (center geometry, radius double precision)

The center is a Point; radius is a double precision in the input's SRID units.

When would you use ST_MinimumBoundingRadius?

Use ST_MinimumBoundingRadius when you need the radius or centre of a feature's bounding circle for classification, clustering, or size comparison — without paying the cost of materialising the polygonal circle. It is ideal for feeding radius-based filters into downstream queries or for comparing feature sizes in a rotation-invariant way.

SQL
1SELECT name, (r).center AS centre_pt, (r).radius
2FROM (
3  SELECT name, ST_MinimumBoundingRadius(geom) AS r
4  FROM buildings
5) t
6WHERE (r).radius < 50;

FAQs

Why use this instead of ST_MinimumBoundingCircle?

ST_MinimumBoundingCircle builds a polygonal approximation of the circle — expensive if you don't need the polygon. ST_MinimumBoundingRadius just returns the numerical centre and radius, which is faster and cheaper to store.

What are the units of the radius?

The same as the input geometry's SRID. For projected CRSs (UTM, EPSG:3857) it is metres; for geographic CRSs like EPSG:4326 it is degrees, which is rarely useful as a distance. Reproject first if you need metres.

Is the centre the same as the centroid?

No. The centre of the minimum bounding circle is the circumcentre of the two or three vertices that define the extremes of the shape — it minimises maximum distance, while the centroid minimises mean squared distance. They can differ significantly for elongated or outlier-heavy shapes.

How do I use this in a WHERE clause?

Wrap it in a subquery or CTE and reference the record fields explicitly: (ST_MinimumBoundingRadius(geom)).radius < 100. Putting the expression directly in WHERE re-evaluates it per reference, so the subquery pattern is preferable.