Compactness measure is a numerical quantity representing the degree to which a shape is compact. The circle and the sphere are the most compact planar and solid shapes, respectively.
Various compactness measures are used. However, these measures have the following in common:
A common compactness measure is the isoperimetric quotient, the ratio of the area of the shape to the area of a circle (the most compact shape) having the same perimeter. In the plane, this is equivalent to the Polsby–Popper test. Alternatively, the shape's area could be compared to that of its bounding circle,[1][2] its convex hull,[1][3] or its minimum bounding box.[3]
Similarly, a comparison can be made between the perimeter of the shape and that of its convex hull,[3] its bounding circle,[1] or a circle having the same area.[1]
Other tests involve determining how much area overlaps with a circle of the same area[2] or a reflection of the shape itself.[1]
Compactness measures can be defined for three-dimensional shapes as well, typically as functions of volume and surface area. One example of a compactness measure is sphericity . Another measure in use is ,[4] which is proportional to .
For raster shapes, i.e. shapes composed of pixels or cells, some tests involve distinguishing between exterior and interior edges (or faces).[2][5]
More sophisticated measures of compactness include calculating the shape's moment of inertia[2][3] or boundary curvature.[3]
A common use of compactness measures is in redistricting. The goal is to maximize the compactness of electoral districts, subject to other constraints, and thereby to avoid gerrymandering.[6] Another use is in zoning, to regulate the manner in which land can be subdivided into building lots.[7]
There is evidence that compactness is one of the basic dimensions of shape features extracted by the human visual system.[8]