This topic describes the ST_MinimumClearance function. This function returns the minimum clearance of a geometry object.


float  ST_MinimumClearance(geometry  g);


Parameter Description
g The geometry object that you want to specify.


  • The minimum clearance of a geometry is the smallest distance by which a vertex of the geometry can be moved to produce an invalid geometry. The minimum clearance of a geometry can be considered as a quantitative measure of the robustness of the geometry. A larger minimum clearance indicates a higher robustness.
  • If a geometry has a minimum clearance of e, the following conclusions can be made:
    • The distance between any two different vertices of the geometry is greater than e.
    • The distance between any vertex of the geometry and a line that is not an end point is greater than or equal to e.
  • If a geometry does not have a minimum clearance, this function returns Infinity. For example, this function returns Infinity for a single point or for a MultiPoint whose points are identical.


Query the minimum clearance of a geometry object by using the default parameter settings.
SELECT ST_MinimumClearance('POLYGON((0 0, 1 0,1 1e-4, 0 0))');
(1 row)