# Compactness measure of a shape

The compactness measure of a shape is a numerical quantity representing the degree to which a shape is compact. The meaning of "compact" here is not related to the topological notion of compact space.

## Properties

Various compactness measures are used. However, these measures have the following in common:

• They are applicable to all geometric shapes.
• They are independent of scale and orientation.
• They are dimensionless numbers.
• They are not overly dependent on one or two extreme points in the shape.
• They agree with intuitive notions of what makes a shape compact.

## Examples

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, its convex hull, or its minimum bounding box.

Similarly, a comparison can be made between the perimeter of the shape and that of its convex hull, its bounding circle, or a circle having the same area.

Other tests involve determining how much area overlaps with a circle of the same area or a reflection of the shape itself.

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 $\Psi$ . Another measure in use is $({\text{surface area}})^{1.5}/({\text{volume}})$ , which is proportional to $\Psi ^{-3/2}$ .

For raster shapes, i.e. shapes composed of pixels or cells, some tests involve distinguishing between exterior and interior edges (or faces).

More sophisticated measures of compactness include calculating the shape's moment of inertia or boundary curvature.

## Applications

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. Another use is in zoning, to regulate the manner in which land can be subdivided into building lots. Another use is in pattern classification projects so that you can classify the circle from other shapes.[citation needed]

## Human perception

There is evidence that compactness is one of the basic dimensions of shape features extracted by the human visual system.