The morphing of geographical features by Fourier transformation

This paper presents a morphing model of vector geographical data based on Fourier transformation. This model involves three main steps. They are conversion from vector data to Fourier series, generation of intermediate function by combination of the two Fourier series concerning a large scale and a small scale, and reverse conversion from combination function to vector data. By mirror processing, the model can also be used for morphing of linear features. Experimental results show that this method is sensitive to scale variations and it can be used for vector map features’ continuous scale transformation. The efficiency of this model is linearly related to the point number of shape boundary and the interceptive value n of Fourier expansion. The effect of morphing by Fourier transformation is plausible and the efficiency of the algorithm is acceptable.


Introduction
Morphing is an important technique in computer graphics and computer vision [1]. In general, morphing can be defined as a gradual and smooth transformation of one key shape into another [2]. Traditional vector morphing involves two basic processes: characteristic correspondence and shape interpolation [3]. The purpose of characteristic correspondence is to establish a characteristic matching relationship between the initial and the target graphs, and the purpose of shape interpolation is to implement a smooth gradient from the initial graphic to the target graphic on the basis of the matching relationship.
In the field of computer graphics, there are two kinds of methods to determine the characteristic correspondence of vector graphics. One is to establish global characteristic correspondence based on optimization technology, and the other is to establish local correspondence based on shape similarity measurement [4]- [6]. As the geometry and topology characteristics of the graphs need to be consistent in the interpolation process, a lot of work has been done on shape interpolation. Sederberg et al [6] proposed an intrinsic interpolation method, which can avoid the shrinkages by both interpolating of the edge length and the point angle of two input shapes. As-rigid-as-possible interpolation method was presented to improve the effect of boundary interpolation by rigid motion and compatible triangulations [7,8].
In the field of cartography and Geographical Information System (GIS), morphing technology can be used to realize continuous generalization and multi-scale representation of spatial data [9]. For the characteristic matching problem, Cecconi and Galanda [10] built a one-toone correspondence between two graphics by inserting additional points based on the proportional chord-length principle. Nöellenburg et al. [11] presented a dynamic programming based matching method to get the global feature correspondence. Deng and Peng [12]  the two linear features into pairs of subpolylines and got the correspondence relationship between the subpolylines by shape similarity measurement. A simulated annealing based optimization algorithm for characteristic matching and shape interpolation was discussed in [13].
To match the orthogonal boundary characteristics, Li et al. [14] proposed a turning function based matching method for building footprints' continuous generalization. For the trajectories problem of shape interpolation, straight-line trajectories are the most popular method. Whited and Rossignac [15] used ball-maps to detect corresponding points for two smooth objects, and then five different trajectories-hat, linear, tangent, circular and parabolic-were used for morphing. Whether in the computer graphics or GIS fields, it is difficult to establish the characteristic correspondence relationship, especially when the boundaries of two anchor shapes are totally different. To avoid the problem of characteristics matching, an alternative strategy is to transform two input geometric graphics into two implicit functions and generates the intermediate shapes by fusing the implicit functions with different parameters. For example, Hughes [16] presented a scheduled Fourier transform to perform morphing in which both basic states were represented as a combined function of high frequency and low frequency, and the morphing effect was achieved by the fusion of the two functions. He et al. [17] decomposed the two basic states into a set of frequency wavelet bands, applied a smooth interpolation to each band, and reconstructed the results to generate the intermediate state. This paper proposes a morphing method of geographical features based on Fourier transformation, which does not require the process of characteristic correspondence. The basic idea of morphing by Fourier transformation is to transform the vector coordinates of geographical feature in spatial domain into function expression in frequency domain using Fourier transformation, then a weighted combination of Fourier expressions of two vector shapes is used to construct the functional expression of the intermediate shape, finally an inverse transformation is performed on the intermediate functional to get the intermediate shape.
The rest of paper is organized as follows. Section 2 investigates the methodology of morphing model by Fourier transformation. The experiments on different geographical features are given in Section 3. Section 4 presents conclusions with suggestions for future improvements.

Conceptual model
In mathematics a two-dimensional vector boundary can be converted into a one-dimensional real function or complex function based on a certain shape signature [18]- [20]. The vector expressions of area and linear geographic features in GIS can also be converted into a onedimensional function. Assuming that α and β are two vector representations of the same geographical entity at large scale s 1 and small scale s 2 , their corresponding function expressions are f 1 and f 2 respectively, and then the function of intermediate representation r g can be represented as: In Formula (1), f is a composite function based on f 1 and f 2 , and g is a normalized weight parameter related to intermediate scale. Assuming that the interpolation scale is s g , then the relationship between g and scales can be expressed as the following formula.
Because of s 2 s g s 1 , so 0 g 1. The greater the value of g, which means the smaller the scale s g , then the function f is more similar to f 2 ; the smaller the value of g, which means the greater the scale s g , then the function f is more similar to f 1 . But how to establish the reciprocal transformation relationships between α and f 1 , β and f 2 , and r g and f. Fourier transformation has the property of reversibility besides the invariance to rotation, translation, and scaling [19]- [23]. Here we use Fourier transformation to implement conversions between geometry coordinates and shape signature function.

Fourier transformation of vector curve: A brief review
Fourier transformation is a way to represent a periodic function or periodic signal into the sum of a set of simple oscillating functions, namely sines and cosines. In GIS, discrete Fourier transformation and inverse transformation usually use an equal-distance sampling approach to represent cartographic curve [24]- [27]. Actually simple area object (polygon without inner ring) can be considered as the "trajectory" formed by a point object's periodic motion. The coordinates of "trajectory" can be described as(X(s), Y(s)), where X(s) and Y(s) are the segmental functions of path length S which can be expressed as Eqs (3) and (4). YðsÞ Where (X i , Y i ) is the coordinate of the i th point on the curve, S i is the path length from the start point to the i th point along the curve, S is the moving point's path length from the start point, and S i S S (i+1) and 0 i N − 1. Given the total point number of a closed curve is N, the function X(s) and Y(s) are periodical functions with a period of S N . Then the functions can be expressed as Eqs (5) and (6) by Fourier series [20]: ðA X;n cos 2nps þ B X;n sin 2nps ð5Þ Where K is an integer, n is the interceptive value of describing the Fourier expansion of curve needed, and Eqs (7)-(10) are known as the Fourier transformation which converts a two-dimensional closed curve into a one-dimensional function, and Eqs (5) and (6) are the inverse Fourier transformations which can reconstruct the curve. Generally, the larger the value of n, the smaller the values of A X,n , B X, n , A Y, n and B Y, n are. When n approaches to infinite, A X,n , B X,n , A Y,n and B Y,n will approximately be zero. In other words, the larger the value of n, the closer the Eqs (5) and (6) are to the original curve.

Morphing model by Fourier transformation
According to Formulas (1), (5) and (6), shape signature functions f 1 , f 2 and f can be denoted as follows: f : From the above discussion, the value of n determines the approximation degree of the Fourier expansion series to the original shape. If we specify the value of approximation degree in advance, the value of n can also be determined through a certain way. First of all, we need to define a function to measure the similarity between two shapes. Assume that the original and intermediate shapes are r 0 and r g (The r g is at intermediate scale and generated by Fourier transformation)respectively, and their intersection is r 0\g . We can define the approximation degree of two shapes as follows: The parameter OD ranges from 0 to 1. The closer the value is to 1, the higher the accuracy of the approximation. Then OD can be considered as the accuracy of original shape expression by Fourier series. While given a specific OD value, the minimal n, which can firstly reach the OD, is chosen as the interceptive value. For the same OD, the shape r α and r β will be approximated with different n values because of their different shape complexity. According to the

The experiment of Fourier series representation of vector data
To illustrate the feasibility of Fourier function representation of vector data, we use seven sets of experimental data to perform the experimental verification. The experimental data includes circle, ellipse, square, rectangle, convex polygon, concave polygon with smooth boundary and concave polygon with orthogonal boundary, which can be denoted as P 1 , P 2 , P 3 , P 4 , P 5 , P 6 , P 7 . In Fig 1, the leftmost polygons on each column are P 1 to P 7 , and the remaining 9 polygons on  Table 1 is the approximation degree between the original polygon and the fitting polygon by Fourier expansion with different interceptive value n. The Fourier expansion method is based on Formula (5) and (6), and the approximation degrees are calculated by Formula (14). From Table 1 we can see that the interceptive parameter n is sensitive to the morphological characteristics of vector data. Generally, the shapes with high compactness, high degree of convex and smooth boundary are faster to achieve the specified approximations degree OD with smaller n values. The shape of circle is the easiest one to be fitted by Fourier transformation. Meanwhile, ellipse and square can be quickly fitted by Fourier transformation with small n values. For example, when OD = 0.99, their n = 5 and 9. The convex polygon P 5 is easier to approximate than concave polygons P 6 and P 7 by this method and the concave polygon with a smooth boundary P 6 is easier to approximate than the concave polygon with an orthogonal boundary P 7 .
Generally speaking, the Fourier transformation model can capture the main outline-information of the shape in low frequency (small n-value) while capture the detail information in high frequency (large n-value). We can obtain the approximate expression of original polygon gradually through a gradual increase in the n-value. So this method can be used to fit the vector data in GIS.

The morphing of vector data by Fourier transformation
The main application of morphing model in cartography and GIS are continuous generalization and multi-scale representation. Here we will test the feasibility of continuous generalization of geographical features using the morphing model presented in section 2. Three type of different geographical features are used to finished this experiment, which are showed in Fig 2. They are building features with orthogonal boundary, lake features with smooth boundary and linear features with smooth boundary. Each set of experimental data consists of two representations of the same geographic entity, one corresponding to a large scale representation, and the other corresponding to a small scale representation. Obviously, the representations at large scale are more detailed than these at small scale. These line features, who's geometry are open curves, need to be reconstructed into closed curves by mirroring. Table 2 shows the relationship between the degree of approximation OD and the interceptive value n of the three sets of data.
In order to ensure the accuracy of morphing, we need to set a high OD value in the process of Fourier fitting of vector data, saying OD = 0.99. When OD = 0.99, we can get the related interceptive value n for B 1 , B 2 , H 1 , H 2 , L 1 , L 2 are 57, 41, 49, 37, 61 and 53 respectively from Table 2. So for the morphing model in Formula (13), the parameters n for building feature, lake feature and linear feature are 57, 49 and 61 respectively. From the discussion in conceptual model we know that we can get representations of vector data with different resolutions by tuning the parameter g. To test the sensitivity of the morphing model to parameter g, two series of g are designed. One series are 0.1, 0.     From Fig 3 we can find that the overall trend in graphic expression of building, lake and linear features is from fine to coarse with the gradual increase of g value. In other words, this morphing model can reflect the gradual process of map representation from big scale to small scale, and all intermediate shapes are fused from the initial (e.g., B 1 , H 1 , L 1 ) and final figures (e.g., B 2 , H 2 , L 2 ). So it is a process of continuous generalization. At the same time, we also find that the model has better application effect on the feature with smooth boundary (such as lake and contour line features) than that with orthogonal boundary (such as building footprint). In the first row of Fig 3, there are some obvious non orthogonal boundary during the gradual process from B 1 to B 2 , these results are not consistent with the specification of building footprint. For the lake and linear features with smooth boundary, their boundaries always maintain a smooth and continuous gradient during the process of interpolation, and the results are plausible.
Considering the adaptability of the morphing model to different features, the other experiment with g series of 0.95, 0.94, 0.93, 0.92, 0.91 is only conducted for the lake feature with smooth boundary. From the amplification effects in Fig 4, we can see even small changes of g (saying 0.01) can cause tiny but smooth, continuous gradients in geometric shapes. So this morphing model is sensitive to scale variations and it is suitable for continuous scale transformation.

Comparative experiment
The following experiments will test the interpolation effect and time efficiency of the morphing model proposed in this paper by comparative analysis and time analysis. The experiment data is still the same as shown in Fig 2, and the g series is still 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. The comparative experiment uses the linear interpolation method proposed in [10]. First we get the one-to-one correspondence between two boundary points by inserting abundant points into the boundary with less points based on the proportional chord-length principle. Then we conduct linear interpolation between the corresponding coordinate points to get the intermediate shape series. Experimental results are shown in Fig 5, from which we can see that the interpolation graph series of building, lake and contour line are abnormal and there are some cases of self-intersection at intermediate scales. Compared with the experimental effects in Fig 3, we can conclude that the morphing model proposed in this paper is better than the simple linear interpolation and the gradient effect is reasonable and effective.
For the morphing of vector data by Fourier transformation, the main time consumption includes three parts: the conversion from vector data to Fourier series by Formula (7)-(10), the generation of intermediate function by combination of the two Fourier series related the large and small scale by Formula (13), and the reverse conversion from the combination function to vector data by Formula (5) and (6). All of these processes are linear time series. So the

Conclusion
This paper presents a morphing model of vector geographical data based on Fourier transformation. The basic idea of the model is to transform the spatial representation of vector data into function expression in frequency domain, and then get the intermediate shapes by functions composition and inverse Fourier transformation. Subject to the constraints of periodic functions, linear objects must be closed before subsequent morphing transformation can be performed. Experimental results show that this method can be used for vector map features' continuous scale transformation. This morphing model is sensitive to scale variations and even small changes of parameter g (saying 0.01) can cause tiny but smooth and continuous gradients in geometric shapes. The efficiency of this method mainly depends on the point number of shape boundary and the interceptive value n of Fourier expansion, and the time consumption is linearly related to these two factors. Generally speaking, there are two advantages of the proposed method compared with the previous method. First, by introducing Fourier transformation, complex characteristics points matching process can be avoided. It is a simple morphing model. Second, this model can be used for morphing transformation of both linear and area features. It is a practical morphing model.
Finally, we can conclude that the morphing model proposed in this paper is suitable for these vector map features who have smooth boundary. For those features with orthogonal boundary, their orthogonality property cannot be maintained in the morphing process. It is not suitable for the morphing of building footprint, nor can it be used for the morphing of polygon with inner island.