Two Sets of Simple Formulae to Estimating Fractal Dimension of Irregular Boundaries

Irregular boundary lines can be characterized by fractal dimension, which provides important information for spatial analysis of complex geographical phenomena such as cities. However, it is difficult to calculate fractal dimension of boundaries systematically when image data is limited. An approximation estimation formulae of boundary dimension based on square is widely applied in urban and ecological studies. However, the boundary dimension is sometimes overestimated. This paper is devoted to developing a series of practicable formulae for boundary dimension estimation using ideas from fractals. A number of regular figures are employed as reference shapes, from which the corresponding geometric measure relations are constructed; from these measure relations, two sets of fractal dimension estimation formulae are derived for describing fractal-like boundaries. Correspondingly, a group of shape indexes can be defined. A finding is that different formulae have different merits and spheres of application, and the second set of boundary dimensions is a function of the shape indexes. Under condition of data shortage, these formulae can be utilized to estimate boundary dimension values rapidly. Moreover, the relationships between boundary dimension and shape indexes are instructive to understand the association and differences between characteristic scales and scaling. The formulae may be useful for the pre-fractal studies in geography, geomorphology, ecology, landscape science, and especially, urban science.


Introduction
Fractal systems can be characterized by fractal dimension, and the basic and important approach to understanding fractal dimension is the geometric measure relations. Euclidean geometric measure relations come from the principle of dimension consistency. A measure (e.g. length) is not proportional to another measure (e.g. area) unless they share the same spatial dimension (Chen, 2015;Lee, 1989;Mandelbrot, 1983). From the principle of dimensional homogeneity, we can derive Euclidean geometric measure relations, which can be generalized to fractal geometric measure relation (Feder, 1988;Mandelbrot, 1983;Takayasu, 1990). From fractal measure relations, we can derive fractal dimension and allometric scaling exponents (Batty and Longley, 1988;Benguigui et al, 2006;Mandelbrot, 1983;Chen and Wang, 2016). An allometric scaling relation can be regarded as a generalized fractal measure relation. Among various geometric measure relations, the common one is the area-perimeter scaling relation, which was used to obtain the boundary dimension of self-similar shapes embedded into a 2-dimensional space (Feder, 1988;Mandelbrot, 1983). In urban studies, the form dimension and boundary dimension can be derived from the fractal measure relations (Batty and Longley, 1994;Frankhauser, 1994). Form dimension of cities include box dimension and radial dimension, which are defined on the basis of the relations of urban area and the linear sizes of box or radius of concentric circles (Batty and Longley, 1994;Frankhauser, 1998). This work focuses on boundary dimension, which can be associated with form dimension in theory.
If we have enough data, we can calculate various fractal parameters. Taking urban research as an example, we can research spatial distribution and structure using box dimension, and research urban growth using radial dimension. If there is not enough information for urban morphology, the boundary dimension of a city can be calculated (Batty and Longley, 1994;Longley and Batty, 1989a;Longley and Batty, 1989b). However, sometimes, we only know the urban area and urban envelope. Urban envelope represents closed urban boundary lines, and urban area represents the region within the boundary curve (Batty and Longley, 1994;Longley et al, 1991). In this case, we can only estimate the boundary dimension by means of the data sets of urban area and perimeter length. Referring to a Euclidean shape, we can construct a series of estimation formulae of fractal dimension. The basic reference shapes are standard circle and square. The formula of boundary 3 dimension based on square has been constructed by Olsen et al (1993), and the formula was widely applied in urban and ecological studies (Chang, 1996;Chang and Wu, 1998). The formula is simple and easy to understand, and has strong practicability. However, it has two drawbacks.
First, this formula is mainly applicable to objects extended in the form of squares. Second, the formula sometimes overestimates the boundary dimension (Chen, 2013;Chen and Wang, 2016). Therefore, we need not only the fractal dimension estimation formulae based on other reference shapes, but also a new fractal dimension estimation formula with reference square. This paper is devoted to deriving two sets of approximation formulae of fractal dimension estimation for the fractal-like boundary dimension of irregular shapes. The reference figures include regular triangle, square, regular hexagon, and standard circle. As a contrast model, the generator of Koch snowflake curve is also employed as one of the reference shapes. From the geometric measure relations based on these reference shapes, a series of formulae are derived to approximately estimate the boundary dimension of various irregular shapes such urban envelopes.

Fractal measure relations 2.1 The first set of formulae
The so-called fractal dimension values based on the approximation formulae are actually fractal indicators, which can be used to replace fractal dimension under the condition of absence adequate data. A basic postulate is that the boundary line of an irregular region is a closed pre-fractal curve.
A pre-fractal is a fractal-like object, which is not a real fractal (Addison, 1997;Mitchell, 2009).
The "length" of true fractal line is infinite. If the irregular boundary such as urban envelope is a real fractal curve, we cannot derive any simple formula for fractal indicators and shape indexes.
Using the ideas from pre-fractals, we can find a number of approximation formulae of boundary dimension from a given reference shape. The reference shapes are some types of regular geometric figures defined in a 2-dimensional Euclidean space, including standard circle, regular triangle, square, regular hexagon, and regular six-pointed star (Figure 1). Triangle can be regarded as the basic shape in Euclidean geometry. All geometric figures, including squares, rectangles, trapezois, circles, ellipses, and irregular shapes, can be reduced to triangles. So the first formula of fractal dimension estimation for irregular boundaries should be derived from a regular triangle. For an equilateral triangle with a side length r, the area A and perimeter P can be expressed as follows (1) r P 3  . (2) Thus the geometric measure relation between area A and perimeter P can be obtained by combining equation (1) with equation (2). Eliminating the side length r yields ( Suppose that the three Euclidean sides are replaced by three fractal lines, and the fractal dimension of these lines is D. In this case, a regular shape changes to an irregular shape ( Figure 2). Thus the Euclidean geometric measure relation, equation (3), should be substituted by a fractal geometric measure relation: where D denotes the fractal dimension of the boundary line. From equation (4), a formula of estimating the fractal dimension of boundary lines can be derived as below: 2 ln( / 3) 2 ln( / 3) ln(2 / sin( / 3)) ln(4 / 3) If the shape of a natural system such as a city is similar to a triangle, or a system has three growing directions, the fractal dimension of the system's boundary line can be estimated by equation (5).
The second formula can be constructed on the basis of square. A square is simple and regular, and it is easy to calculate its area A and perimeter P if the side length r is known. The area and perimeter formulae are as follows Combining equation (7) and equation (6) yields the geometric measure relation between the area A and perimeter P as below: If the sides of the square are replaced by the fractal lines with fractal dimension D, the geometric measure relation, equation (8), will be replaced by From equation (9), a fractal dimension estimation formula can be derived as follows This formula is familiar to many scholars who like geographical and ecological fractals because it was once derived by Olsen et al (1993) in another way. If the shape of a natural system is similar to a square, or a system has four growing directions, the boundary dimension of the system shape can be estimated by equation (10).
The regular hexagons can be best closed to each other in a geographical region. Therefore, the hexagonal networks were applied to the well-known central place theory (Christaller, 1966). The area A and perimeter P of a regular hexagon with a side length r can be calculated by the following formulae: From the equations (11) and (12), we can derive a geometric measure relation such as Substituting the Euclidean sides of the hexagon with fractal boundary lines, we can turn equation (13) into a fractal measure relation as follows From equation (14), a fractal dimension estimation formula can be obtained as below: 2 ln( / 6) 2 ln( / 6) ln( / (3sin( / 3))) ln(2 / (3 3)) If the shape of a natural system is similar to a hexagon, or a system has six growing directions, the boundary dimension of the system can be estimated by equation (15).
The standard circle is treated a simple and perfect shape in Euclidean geometry. Many shape indexes of geography are based on this kind of circle (Chen, 2011;Haggett et al, 1977;Taylor, 1977). The area A and perimeter P of a circle with a radius r can be given by Integrating equation (16) into equation (17) yields the geometric measure relation between the circular area A and circumference P as follows Replacing the Euclidean perimeter with a fractal curve results in a fractal measure relation as below: Thus the fractal dimension of the boundary can be calculated by the following formula If the shape of a natural system is similar to a circle, or if a system is of isotropic growth, the boundary dimension of the system can be estimated by equation (20).
All the above-given formulae are based on Euclidean figures. For comparison, it is advisable to construct a calculation formula based on fractal generators. Koch snowflake curve is one of classical models for fractal lines. We can design the formula using the generator of Koch snowflake curve, a regular six-pointed star. For fractal generator of Koch snowflake curve with a side length r, the area A and perimeter P are as follows 2 6sin( / 3) 12 Pr  .
(22) Thus the geometric measure relation between the area A and perimeter P can be derived as The generator of Koch curve is not a fractal line, but the second step is a pre-fractal figure.
Substituting the straight line segments with fractal lines yields a fractal measure relation as below: in which D refers to the fractal index of irregular curve. The formula of fractal dimension estimation based on the Koch snowflake generator can be derived from equation (24) as follows 7 2 ln( / 12) 2 ln( / 12) ln( / (6sin( / 3))) ln( / (3 3)) If the shape of a natural system is similar to a Koch snowflake, or a system has six protruding growth directions, the boundary dimension of the system can be estimated by equation (25)

The second set of formulae
The above-shown formulae are suitable for the very irregular boundary lines, otherwise the fractal dimension may be overestimated. In order to estimate the boundary dimension of general fractal-like line, we should improve the formulae. Based on regular triangles, equation (4) can be 8 replaced by the following fractal measure relation which can be expressed as From equations (26) and (27), a triangle-based fractal dimension formula can be derived as below: 2 ln( ) 2 ln( ) ln(24sin( / 3) ) ln(12 3 ) Compared with equation (5), equation (28) can give more realistic dimension values of fractal lines. Based on squares, equation (9) can be substituted by which can be rewritten as From equation (30), a square-based fractal dimension formula can be derived as follows 2 ln( ) ln(16 ) Compared with equation (10), equation (31) can yield more realistic values of boundary dimension. Based on regular hexagons, equation (14) can be replaced with which is equivalent to From equations (32) and (33), a hexagon-based fractal dimension formula can be derived as follows 2 ln( ) 2 ln( ) ln(12 / sin( / 3)) ln(8 3 ) Compared with equation (15), equation (34) can produce more realistic values of boundary dimension. Based on the standard circle, equation (19) can be replaced by which can be converted into From equation (36), a circle-based fractal dimension formula can be derived as below 2 ln( ) ln(4 ) Compared with equation (20), equation (37) can give more realistic fractal dimension values of boundary lines. Based on the regular six-pointed star, equation (24) can be substituted with which can be converted into From equations (38) and (39), a Koch-snowflake-based fractal dimension formula can be derived as below 2 ln( ) 2 ln( ) ln(24 / sin( / 3)) ln(16 3 ) Compared with equation (25), equation (40) can give more realistic values of fractal indexes of boundary lines.
The two sets of fractal dimension estimation formulae represent two sets of fractal boundary indexes. For the convenience of readers, the two sets of formulae are tabulated as follows (Table   1). Applying these formulae to a simple irregular shape (Figure 2), we can obtain two sets of fractal indexes values for boundary lines (Table 2) The first formula based on square was proposed by Olsen et al (1993). As a reference, the corresponding shape indexes are listed in the right column.

Relations of boundary dimension to shape indexes
The area-perimeter measure relation is in essence a problem of scaling in complex systems. The 11 formulae of boundary dimension represent various definitions of the scaling exponents of different shapes. The traditional thinking of mathematical modeling and quantitative analysis is based on characteristic scales (Chen, 2008;Hao, 1986;Liu and Liu, 1993;Takayasu, 1990;Wang and Li, 1996). Therefore, a number of shape indexes have been derived from the area-perimeter relations to describe natural morphology such as urban patterns (Chen, 2011;Haggett et al, 1977;Taylor, 1977). Two typical shape indexes are the circularity ratios, which are defined on the basis of area and perimeter (Haggett et al, 1977). However, complex systems such as cities have no significant characteristic scales in many aspects (Chen, 2008). In this case, the scaling concept is employed to substitute the notion of typical scales such as characteristic lengths. Correspondingly, we utilize scaling exponents instead of shape indexes to characterize the form features of irregular patterns. The scaling exponents are based on the ideas from fractal geometry, while the shape indexes are based on the notion of Euclidean geometry. Despite the difference between the scaling exponents and shape indexes, there are inherent association of boundary dimension with shape indexes. The relations between the circularity ratios and the reciprocal of the boundary dimension has been proved to be the exponential function (Chen, 2011). Based on area and perimeter, a series of shape indexes similar to the circularity ratios can be derived from the above-shown geometric measure relations, which are listed in Table 1. Applying these formulae to Figure 2 yields a series of values for shape indexes. The relations between the new shapes indexes and the second set of boundary dimension can be demonstrated to satisfy the following exponential function where the parameters are a=1/P 2 and b=2ln(P). For example, for Figure 2, the relationship between the second type of boundary dimension and the shape index is as follows which can be verified by the observational data (Table 2). It is easy to testify that a=1/295.1157^2 = 0.00001148 and b = 2*ln(295.1157) =11.3747.
If the boundary line is a true fractal line, then the perimeter will be infinite. In this case, equation (41) will be invalid. This suggests that the fractal dimensions and shape indexes in Table   1 will be invalid for true fractal boundary lines. In the real world, the boundary lines are fractal-like lines rather than true fractal lines. A real fractal bears no scaling limitation, and the 12 geometric measure relation can be reflected by a straight line of infinite length on a log-log plot.
In contrast, a pre-fractal possesses fractal nature only within certain scaling range. Therefore, the perimeters of pre-fractal closed curves bear certain values, and thus the formulae derived above are valid. Moreover, equation (41) lend further support to the inference that the relationships between the reciprocal of boundary dimension and the circularity ratios meet an exponential function. However, the relations between the shapes indexes and the first set of boundary dimension cannot be described with the exponential function exactly. Despite this, the inherent correlation between characteristic scales and scaling can be reflected by the relationships between boundary dimension and shape indexes.

Fractal dimension estimation results
To show the effects of the two sets of fractal dimension estimation formulae, we can apply them to the cities in Beijing, Tianjin, and Hebei region, China (for short, Jing-Jin-Ji region). There are 13 main cities in the study area. As a preparation, it is necessary to extract urban boundary lines using a proper method. In urban geography, the boundary curve of a city is termed urban envelope, and the region within the urban envelope is termed urban area (Batty and Longley, 1994;Longley et al, 1991). There are at least four scientific approaches to identifying and delineating urban envelopes for these cities , including the city clustering algorithm (CCA) (Rozenfeld et al, 2008), the automatic identification method of urban settlement boundaries 13 (Chaudhry and Mackaness, 2008), the fractal-based method (Tannier et al, 2011), and the approach to derive 'natural cities' by clustering street nodes/blocks (Jiang and Jia, 2011). In this paper, CCA is employed to delineate urban boundary lines on interpreted remote sensing images in different years. The urban boundary determined by this method corresponds to an urban agglomeration, which approximately corresponds to an urbanized area. The urban envelopes give urban perimeters, and the corresponding urban areas can be counted (Table 3). These datasets can be used to verify the geometric measure relation between urban area and perimeter and evaluate the fractal boundary indexes (Chen and Wang, 2016;Chen et al, 2019). It is easy to calculate the boundary fractal dimension of the 13 cities in Beijing, Tianjin and Hebei region using each formula. As indicated above, the fractal dimension estimation values  (Table 4, Table 5, Table 6). The shape indexes are listed separately for reference (Table 7). The boundary fractal dimension based on the first set of formulae has weak correlation with the shape index. However, there is negative correlation between the fractal dimension values based on the second set of formulae and the shape indexes (Supplementary File 1).   It is necessary to discuss the exceptional values in the fractal dimension estimation results. In theory, the boundary dimension defined in a 2-dimensional embedding space is supposed to come between 0 and 2 (Batty and Longley, 1994;Chen, 2018;Chen, 2019;Mandelbrot, 1983;Longley and Batty, 1989a;Longley and Batty, 1989b). The reasonable values vary from 1 to 1.5. However, the following causes often result in over estimation of boundary dimension. First, the boundary dimension calculation is based on the geometric measure relation deriving from regular real fractals in the mathematical world. A real fractal has no scaling range, or, in other words, the scaling range of a real fractal is infinite. Applying the fractal measure relations proceeding from regular real fractals to the random pre-fractals gives rise to significant bias in many cases (Chen, 2013). Second, if the image resolution is high enough, the length of the boundary line may be very 16 long, but the area within the boundary curve is certain. This phenomenon can be illustrated by a regular fractal termed Koch lake (see Appendix). The Koch lake can be treated as models of lakes, islands, urban region, and so on. Third, compared with the second set of approximate formulae, the first set of approximate formulae enlarge the ratio of the perimeter logarithm to the area logarithm of a shape relatively. For example, for the formulae based on square, in equation (10), the circumference is reduced to a quarter of the original length; while in equation (31), the area is enlarged to 16 times the original one. As a result, the boundary dimension value of a shape based on equation (10) is significantly greater than the value based on equation (31). Generally speaking, the estimated value of a boundary dimension is not less than 1. However, if a figure is near a Euclidean shape, the fractal dimension estimation result may be an outlier and less than 1 because that the formulae is designed for pre-fractals rather than for Euclidean shapes.

Fractal dimension adjustment and transformation
Fractal lines falls into two types: one is boundary lines, and the other is what is called space-filling curves. In theory, the well-known boundary line is Koch snowflake curve, and the well-known space-filling curve is Peano curve (Mandelbrot, 1983). In reality, fractal boundary lines include coast lines, urban boundaries, lake boundaries, and national boundaries, and space-filling curves include rivers, traffic networks, and hierarchical boundaries in central place systems. Generally speaking, the average values of fractal dimension of boundary lines come between 1 and 1.5, while the fractal dimension values of space-filling curves vary from 1.5 to 2. If a fractal dimension of urban boundary is over estimated, it can be adjusted by a simple formula.
What is more, the adjusted boundary dimension can be converted into the fractal dimension of urban form. The adjusted boundary dimension is as follows (Chen, 2013) where Db denotes the adjusted boundary dimension, and Dl refers to the originally estimated fractal dimension (Note: The subscript for Dl is the Latin letter l, not the Arabic numeral 1). Using this formula, we can adjust the boundary dimension values (Table 8). The boundary dimension and the form dimension satisfy a hyperbolic relation as blow (Chen, 2013): where Df refers to the form dimension of a city. Using this formula, we can transform the adjusted boundary dimension values into the fractal dimension of urban form (Table 9).  The approximate fractals dimensions are in fact fractal indexes. An index can condense many data into a number, describing the characteristics of a system and simplifying the analytical process. Given the area and perimeter of an irregular shape such as an urban envelope, we can calculate its fractal indexes using these sets of formulae. All these approximate formulae can be 20 applied to estimation of boundary dimension of the cities in the Yangtze River Delta, China. The datasets in 1985, 1996, and 2005 have been published (Chen and Wang, 2016

Discussion
The above-shown results are based on power-law relations, and a power law represents a geometric measure relation and reflects a proportional relationship. A power function has two parameters: one is the proportionality coefficient, and the other is the power exponent. In the framework of Euclidean geometry, the power exponent is always a known constant and bears little useful information. Thus we can construct various shape indexes based on proportionality coefficients. A proportional constant is always a dimensionless parameter reflecting a ratio of one measure to another measure. On the contrary, in the framework of fractal geometry, the proportionality coefficient bears little information, but the power exponent is unknown parameter and possesses spatial information. A simple system has characteristic scale and can be described with the mathematical method based on Euclidean geometry, while a complex system has no characteristic scale and cannot be effectively described by conventional mathematical methods. In this case, it is necessary to replace the characteristic scale concept with scaling idea. The power exponent is known as scaling exponent. Fractal geometry is a powerful tool for scaling analysis of complex systems, and the fractal dimension is an important scaling exponent. Based on the notion of fractals, various fractal indexes can be defined to characterize fractal-like phenomena.
A set of formulae for estimating the boundary dimension of irregular shapes have been derived from the geometric measure relations between the area and perimeter of certain reference figures.
The reference shapes include regular triangle, square, regular hexagon, circle, and the generator of Koch snowflake curve. From difference reference shape, we can obtain different formulae; from the same reference shape, we can obtain at least two different formula based on different conditions (Table 1). Different formulae have different spheres of application. In practice, we 21 should select the proper formula according to the shape and irregularity of studied objects. As a matter of fact, a number of methods can be used to calculate the boundary dimension. The common methods include divider method (Mandelbrot, 1967;Richardson, 1961), box counting method (Song et al, 2012;Wang et al, 2005), and so on. Longley and Batty (1989a;1989b) developed four methods to measure the fractal dimension of fractal lines. Given enough image data, it is not problematic to calculate the boundary dimension (Batty and Longley, 1988;Chen and Wang, 2016;Cheng, 1995;Imre, 2006;Imre and Bogaert, 2004 A fractal measure relation can be treated as an allometric scaling relation. These scaling relations are widely applied to urban research. In fact, the geometric measure relation between urban area and urban perimeter bears analogy with the allometric scaling relation between urban population and urban area, which can be expressed as where S denotes the population size of a city. Thus the allometric scaling relation between urban population size S and urban boundary length P can be derived as follows which can be re-expressed as where μ=SP -α represents the proportionality coefficient, and α=Dp/D is the scaling exponent. This 22 suggests that urban population size is in a proportion to α power of the urban perimeter.
Further, the geometric measure relation can be generalized to the traffic network of a city.
Suppose that the urban area is A and the total length of traffic lines is L. According to the principle of dimension consistency, we have where Dw denotes the fractal dimension of traffic networks. For comparability, the proportionality coefficient is assumed to be 1, then equation (48) can be transformed into From equation (49)  Comparably speaking, scaling concept is more important. Cities are complex spatial systems, and many aspects of urban systems have no characteristic scales. Scaling in cities has attracted more and more attention of scholars (Arcaute et al, 2015;Batty, 2008;Bettencourt, 2013;Bettencourt et al, 2007;Chen, 2008;Louf and Barthelemy, 2014a;Louf and Barthelemy, 2014b;Ortman et al, 2014;Pumain, 2006). Fractal geometry is one of powerful tools in scaling analysis and has been applied to urban studies, which resulted in a number of interesting achievements.
The series of approximation formulae of boundary dimension provide simple approaches to scaling analysis of cities. The shortcomings of this study lies in two aspects. First, the formulae of boundary dimensions and the corresponding shape indexes have not yet be derived from regular pentagon. Compared with the regular triangle, square, regular hexagon, and standard circle, the regular pentagon is more complex because it can be associated with fractals. Second, the systematic positive study has not been made. The empirical evidences shown in this paper is only 23 for methodology rather than for urban studies. What is more, the formulae are only suitable for random pre-fractals rather than real fractals (Appendix). Due to the limitation of space of a paper, the pending questions will be answered in future studies.

Conclusions
Boundary line represents a perspective of spatial patterns and landscape analysis of complex systems. In this paper, various possible formulae for estimating boundary dimension are systematically studied and compared. The aim of this work is to provide two sets of practical where m=1,2,3, … denotes steps of fractal generation. Clearly, if m→∞, then Pm→∞. In contrast, the area of Koch lake is limited. In light of the knowledge of geometry and trigonometry, the area of Koch lake is where m=1,2,… refers to steps of fractal development. Under the limit condition, the area of Koch lake approximates a constant, that is,