WOLFRAM|DEMONSTRATIONS PROJECT

Box-Counting the Dimension of Coastlines

​
coastline
Japan
Norway
Great Britain
mesh size
coarse
medium
fine
This Demonstration uses the box-counting method [1] to estimate the fractal dimension of three coastlines. The box-counting dimension of a coastline can be computed using a mesh of evenly spaced squares laid over a map of the coastline.
Let
N
s
be the number of squares that are required to cover the whole coastline and
s
be the sidelength of one square of the mesh. Then the box-counting dimension
D
is
lim
s0
log(
N
s
)
log(1/s)
.
D
can be interpreted as the slope of a straight line in a plot of
log(
N
s
)
versus
log(1/s)
. To approximate this, take five points determined by five values of
s
and compute the slope of the linear fit between those points. Smaller values for
s
and higher map resolutions lead to a more accurate estimate, as can be verified by selecting a finer mesh from the menu. It has been computed that the box-counting dimension of the coastline of Great Britain is 1.25 by using a very fine mesh on a very detailed map. This Demonstration finds values up to 1.18 using mesh sizes and a map resolution compatible with a reasonable computing time.
A detailed description of the box-counting method used in this Demonstration can be found in [2].