applied sciences

Article A Novel Method for Building Displacement Based on Multipopulation Genetic Algorithm

Wende Li 1, Tinghua Ai 1,* , Yilang Shen 1 , Wei Yang 2 and Weilin Wang 1 1 School of Resource and Environment Sciences, Wuhan University, Wuhan 430079, China; [email protected] (W.L.); [email protected] (Y.S.); [email protected] (W.W.) 2 School of Management Science and Real Estate, Chongqing University, Chongqing 400044, China; [email protected] * Correspondence: [email protected]; Tel.: +86-139-0863-9199

 Received: 10 November 2020; Accepted: 25 November 2020; Published: 26 November 2020 

Abstract: Owing to scale reduction and other cartographic generalization operations, spatial conflicts may occur between buildings and other features in automatic cartographic generalization. Displacement is an effective map generalization operation to resolve these spatial conflicts to guarantee map clarity and legibility. In this paper, a novel building displacement method based on multipopulation genetic algorithm (BDMPGA) is proposed to resolve spatial conflicts. This approach introduces multiple populations with different control parameters for simultaneous search optimization and adopts an immigration operation to connect different populations to realize coevolution. The optimal individuals of each population are selected and preserved in the elite population through manual selection operation to prevent the optimal individuals from being destroyed and lost in the evolutionary process. Meanwhile, the least preserving generation of the optimal individuals is used as the termination basis. To validate the proposed method, urban building data with a scale of 1:10,000 from Shenzhen, China are used. The experimental results indicate that the method proposed in this paper can effectively resolve spatial conflicts to obtain better results.

Keywords: cartographic generalization; building displacement; conflict resolution; multipopulation genetic algorithm

1. Introduction In automatic cartographic generalization, spatial conflicts (e.g., proximity conflicts or overlap conflicts) often occur between both the same and different features (e.g., between buildings and buildings or between buildings and roads) because of map scale reduction and other cartographic generalization operations. To resolve such conflicts, several generalization operations, such as selection [1], aggregation [2,3], elimination [4], typification [5,6], and displacement [7,8], have been used. Compared with other generalization operations, the displacement operation is the most important and frequently adopted method to resolve spatial conflicts. With the development of big data and artificial intelligence, spatial conflict solutions based on displacement operation in cartographic generalization are facing new challenges (e.g., real-time displacement) [9,10]. Therefore, it is urgent to explore more effective automatic displacement approaches. Building displacement only slightly moves buildings from their original position to new position on the premise of ensuring positional accuracy, which does not significantly reduce the information content in a map [11]. In the process of displacement, several main issues should be considered. First, the displacement approach should try to resolve all possible spatial conflicts under the constraint of positional accuracy, which indicates that the maximum displacement distance of objects on a map should be limited to a specified range (e.g., 0.5 mm). Second, the displacement operation should

Appl. Sci. 2020, 10, 8441; doi:10.3390/app10238441 www.mdpi.com/journal/applsci Appl. Sci. 2020, 10, 8441 2 of 20 avoid generating secondary conflicts after moving some map objects. Third, the displacement should maintain the spatial positional relations between individual buildings and the arrangement patterns and distribution characteristics within building groups. However, different constraints may contradict each other, and it is not possible to find a solution that satisfies all constraints completely. Instead, a feasible solution is to find the best compromise among constraints. Therefore, the problem of building displacement can be regarded as the combinatorial optimization problem satisfying multiple cartographic constraints [12], which can be solved by the heuristic search method. The genetic algorithm (GA) [13] is a highly parallel and adaptive global optimal search algorithm based natural selection in the biological world. Because of its strong robustness and global search ability, the GA has been widely used in the cartographic generalization field, such as the geographical feature label placement problem [14], map conflation [15], feature selection [1,16], and displacement operation [17,18]. However, with the development of GA research, its shortcomings have gradually been exposed, such as premature convergence. For example, when the GA is used for the displacement of buildings to resolve spatial conflicts, the premature convergence of the GA will cause all individuals in the population to tend to be in the same state and stop evolution, resulting in the algorithm not resolving all defined spatial conflicts. Therefore, we propose a novel building displacement method based on multipopulation genetic algorithm (BDMPGA) to resolve spatial conflicts. The BDMPGA breaks through the structure of traditional GA that only relies on a single population for genetic evolution, which introduces multiple populations with different control parameters to conduct simultaneous optimization searches. The immigration operation is used to realize the information exchange among different populations to maintain the diversity of individuals in the population and obtain the optimal solution. Meanwhile, this method adopts elite retention strategy that the optimal individuals in the population are selected and preserved in the elite population through manual selection operation, and the elite population is also the basis for the termination of the algorithm. The remainder of this article is organized as follows. Section2 summarizes existing studies on the spatial conflict resolution by the displacement operation. Section3 introduces the main steps of the BDMPGA. Section4 presents the specific application of the BDMPGA in building displacement and compares it with GA and the immune genetic algorithm (IGA). Section5 describes the conclusions of this study and future work.

2. Related Work In this section, we will briefly summarize the relevant approaches of the displacement operation to resolve spatial conflicts. These approaches can be divided into two categories: sequential approaches and optimization approaches.

2.1. Sequential Approaches For sequential approaches, first, conflicting map objects are detected by analyzing the context of the map objects. Then, the displacement vector of each conflicting object is calculated. Finally, the spatial conflicts are resolved by moving each conflicting object in turn. Lichtner [19] proposed a method to calculate the displacement vector by establishing an equation system. Mackaness [20] presented a radial displacement algorithm for the point cluster displacement issue. This method adopts cluster analysis to identify conflicting groups and uses a density function to control the displacement decay to maintain the gestalt or pattern of the cluster. Ruas [21] proposed a reactive displacement algorithm for urban area buildings. This method uses constraint analysis and result evaluation to control the displacement process and combines with other map generalization operations. To resolve the conflict between roads and buildings because of an exaggeration of the road symbol, Fei [22] proposed a special hybrid raster–vector data structure. By dividing buildings into four types, conflicts can be resolved according to corresponding strategies. Basaraner [23] proposed an iterative displacement method for buildings based on generalization zones. This algorithm first creates the generalization zones by means of Voronoi tessellation and techniques and then uses Appl. Sci. 2020, 10, 8441 3 of 20 multiple criteria to control the displacement. Ai et al. [7,24] borrowed the idea of fields from physics discipline and established a vector field model to handle the displacement of multiple conflicts in building generalization. This approach applies the displacement force on conflicting objects and considers the displacement distance decay effect, secondary conflicts can be resolved by attractive force. Later, Zhou et al. [8] proposed a multisource force field model to resolve multiple conflicts and maintain spatial relationships of buildings.

2.2. Optimal Approaches Compared with sequential approaches, optimization approaches consider all map objects and resolve all spatial conflicts simultaneously and can be further divided into combinatorial and functional optimization approaches.

2.2.1. Combinatorial Optimization Approaches In combinatorial optimization approaches, the new locations of map objects are determined by trials, and the most commonly adopted approaches are heuristic search algorithms. Ware et al. [25] adopted simulated annealing approach and steepest gradient descent approach to resolve graphic conflicts. Through experimental comparison, the simulated annealing approach is superior with regard to the degree of conflict reduction. Afterwards, multiple generalization operators, such as displacement, size exaggeration, deletion, and size reduction, were adopted as the candidate trial positions of buildings in simulated annealing approach, which can resolve graphic conflicts more effectively [11]. Based on the same idea, Ware et al. [26] used the tabu search metaheuristic to resolve the spatial conflicts between objects after scaling and achieved near optimal solutions within practical time constraints. Wilson et al. [17,18] resolved spatial conflict by a GA that codes candidate displacement solutions as a chromosome and constructs the objective function by considering multiple cartographic constraints. The optimal solution is obtained through genetic operations, including selection, crossover, and mutation. To overcome the shortcomings of the GA, Sun et al. [27] proposed an IGA for building displacement, which considered the arrangement pattern constraint and tangent relation constraint. Huang et al. [28] presented an improved particle swarm optimization algorithm that uses the dual-inheritance framework to optimize the topologic structure of particles, and the optimal displacement solution is obtained by the niche Pareto competition mechanism.

2.2.2. Functional Optimization Approaches Functional optimization approaches introduce models and ideas from other fields, such as the mechanics of materials, physics and engineering, and construct displacement mathematical equation systems (e.g., least squares adjustment method, energy minimization method, finite element method (FEM)). Compared with combinatorial optimization approaches, functional optimization approaches are more complex, the key of which is how to transform related cartographic constraints into mathematical equations. Harries [29–31] proposed the constraint method for solving spatial conflicts, which expressed the constraints as linear equations and used a least squares adjustment to find the optimal solution. Since the constraints are contradictory and all constraints cannot be completely satisfied, the constraints were set to different weights according to the constraint type to obtain the optimal compromise scheme. Again, Sester [32] adopted the same idea and used least squares adjustment for the displacement and shape simplification of building groundplans. Højholt [33] modelled the displacement as the deformation of an elastic body and proposed the FEM to handle conflicts during the generalization of . The FEM first discretized the whole map space though constrained Delaunay triangulation and then introduced boundary constraints to control the shape and size of objects. Because of the holistic propagation of displacement, the FEM can maintain spatial relationships and patterns. However, the FEM cannot resolve all spatial conflicts and will cause large deformations of objects. Appl. Sci. 2020, 10, 8441 4 of 20

For the linear feature displacement problem, Burghardt and Meier [34] proposed the snake algorithm to resolve spatial conflicts. In the snake model, the deformation of linear objects generates internal energy, and the conflicts between linear objects and other objects generate external energy. When the total energy is the minimum, the linear objects obtain the optimal position and shape. The snake model is very suitable for the displacement of linear objects because it considers the propagation of the displacement, which can maintain the shape of linear objects during the displacement. Later, Wang et al. [35] combined the snake model into a multi-agent process to resolve multiple types of spatial conflicts and obtained good results. To solve the area feature displacement problem, Bader et al. [36,37] adopted the idea of the snake model and proposed the Beams algorithm. The Beams model first adopts an enhanced minimum spanning tree as an elastic truss to capture the important spatial patterns of building clusters. Then, the Beams algorithm iteratively deforms the truss to minimize energy until a user-defined threshold value is achieved. Liu et al. [38] proposed a fully automated building displacement algorithm by combining the constrained Delaunay triangulation skeleton and elastic beams, which is an improvement on the elastic beams algorithm. Through the literature summarized above, we can conclude that (1) although the sequential approaches are relatively simple to resolve the spatial conflicts by one displacement, they may generate secondary conflicts; (2) the functional optimization approaches use mathematical ideas to model the spatial relationships and constraints between objects, which can well maintain the spatial relations between objects in the process of displacement, but the modelling process of this kind of algorithm is complex and cannot solve all possible spatial conflicts; and (3) the combinatorial optimization method uses a heuristic search strategy to obtain the optimal solution, which meets the current goal of the intelligent and automatic displacement methods. However, the current combinatorial optimization algorithms, such as GA and IGA, cannot resolve all possible spatial conflicts and even generate secondary conflicts. Therefore, a novel building displacement method based on multipopulation genetic algorithm (BDMPGA) is proposed to resolve spatial conflicts, which improves the deficiencies of the traditional GA and IGA.

3. Introducing BDMPGA In this section, we introduce the proposed building displacement method based on the multipopulation genetic algorithm (BDMPGA). This approach introduces multiple populations with different control parameters for simultaneous search optimization. Each population can specify different crossover probability and mutation probability to achieve different search objectives. In this way, the defect of single parameter value in traditional GA is avoided, and the global search and local search of the algorithm are taken into account at the same time. The immigration operation is used to connect each population, which introduces the optimal individual from each population to other populations to realize the information exchange between different populations and maintain the diversity of individuals in the population. The acquisition of the optimal solution is a comprehensive result of multiple population coevolution. The manual selection operation is used to select and preserve the optimal individual of each population in the elite population during evolution. The elite population is different from other populations. The elite population does not carry out genetic operations such as selection, crossover and mutation, so as to ensure that the optimal individuals produced by each population will not be destroyed and lost. Meanwhile, this method uses the least preserving generation of the optimal individual as the termination basis, which is more reasonable than the maximum genetic generation. The BDMPGA can be divided into five main parts: (1) chromosomal coding based on the real coding method; (2) genetic operations include the selection operation based on roulette wheel method, crossover operation based on arithmetical crossover strategy, and mutation operation based on nonuniform mutation method; (3) immigration operation between different populations; (4) manual selection operation base on the elite retention strategy; and (5) the definition of the objective function and fitness function. The framework is shown in Figure1, and the detailed operations are as follows. Appl. Sci. 2020, 10, 8441 5 of 20

Figure 1. Framework of the BDMPGA.

3.1. Chromosomal Encoding The BDMPGA first represents the solution of the actual problem as genotype string structure data in the genetic space before the search for evolution. For buildings displacement, the real encoding method is adopted to represent the displacement solution as a chromosome. Real coding is the natural selection of a continuous parameter optimization problem, which has the advantage of high precision and convenience for large space searches. Within a given range of maximum displacement distances, the displacement distances of each building in the X direction and Y direction are randomly generated and then assembled together to form a chromosome. Figure2 shows the representation of one chromosome and one population.

Figure 2. Representation of a chromosome and a population. (a) One chromosome, Bi(i = 1, 2, ... , n) represents the displacement distance of the ith building in the X and Y directions; (b) One population, Cj(i = 1, 2, ... , m) represents the jth chromosome or individual in a population, which is composed of N buildings assembled together by displacement distances in the X and Y directions. Appl. Sci. 2020, 10, 8441 6 of 20

3.2. Genetic Operations There are several operations in the BDMPGA, such as selection, crossover, and mutation operation. The selection operation selects fine individuals from the parent population according the selective probability. These individuals have a chance to produce the child individuals. The probability of an individual being selected is related to the fitness value. The higher the fitness value of an individual is, the greater the probability of being selected is. The selection methods include roulette wheel selection, tournament, and other methods. This study adopts the roulette wheel selection method, namely, one individual is selected by its fitness ratio. The probability of an individual Xi being selected is calculated by the following equation:

f (Xi) P(X ) = i PN (1) i=1 f (Xi) where f (Xi) is the fitness value of individual Xi, P(Xi) is the probability of individual Xi being selected, and N is the number of individuals in one population. The crossover operation is the most important genetic operation in the BDMPGA, which defines the procedure of generating new individuals by exchanging information in parent individuals. The child individuals inherited the excellent characteristics of the parent generation. This operation determines the global search ability of the algorithm. As individuals are coded in real numbers, the crossover operation adopts the arithmetical crossover strategy [39] in the BDMPGA. The arithmetical crossover is calculated according to the following equation: ( x = x (1 α) + x α kj lj ∗ − kj ∗ (2) x = x (1 α) + x α lj kj ∗ − lj ∗ where xkj represents the jth gene in individual Xk, xlj represents the jth position on individual Xl, and α is the random number in the interval [0, 1]. The mutation operation defines the procedure by which offspring individuals are altered randomly with a small probability after the crossover operation. The mutation operation determines the local search ability of the BDMPGA, which guarantees the population diversity and facilitates convergence at the global optimum and avoids premature convergence. The nonuniform mutation is adopted in the BDMPGA, which searches the entire space at the beginning and only local search searches at the end and can help to find better points quickly. The nonuniform mutation is calculated by the following equation:      xij + xij xmax f (gen), r 0.5 xij =   −  ∗ ≥ (3)  x + x x f (gen), r < 0.5 ij min − ij ∗ where xmax is the upper bound of gene x , x is the lower bound of gene x , f (gen) = r ij min ij 2 ∗ (1 gen/MaxGen)2, r is a random number, gen is the current iteration number, MaxGen is the − 2 maximum iteration number, and r is the random number in the interval [0, 1].

3.3. Immigration Operation Different populations are connected to each other by the immigration operation in the BDMPGA. The BDMPGA first initializes multiple populations, and each population is independent of the other. To realize the exchange of information among different populations, the immigration operation is used to establish the relationship between different populations. After every certain evolution generation, the best individual in population will be introduced to other populations through immigration operation. The worst individual in the target population is replaced by the selected best individual. In this way, the individual diversity of target population can be changed and the premature convergence of single population can be overcome. The immigrant operation is very important for the BDMPGA, which Appl. Sci. 2020, 10, 8441 7 of 20 realizes the coevolution of multiple populations. If there is no immigration operation, then different populations will lose contact with each other. The role of the immigration operation is shown in Figure3.

Figure 3. of the immigration operation. 3.4. Manual Selection Operation In the process of evolution, excellent individuals are selected by the manual selection operation from other populations and stored in elite population. Elite population is different from other populations. Genetic operations, such as selection, crossover, and mutation, are not carried out for the elite population and ensure that excellent individuals are not lost or destroyed. Meanwhile, the elite population is also the basis for the termination of the algorithm. Unlike the traditional GA, the BDMPGA adopts the least preserving iteration number of the best individual as the algorithm termination condition, which makes full use of the accumulation of knowledge during evolution. The specific realization process of manual selection operation in the BDMPGA is as follows: 1. Initialize the elite population, which is used to preserve the best individual in each population during evolution. The number of individuals in the elite population is the number of populations. 2. The individual with the highest fitness value in each population is selected and preserved in the elite population. 3. Update the elite populations. If a subpopulation produces better individual, then the optimal individual is selected to update the corresponding individual in the elite population; otherwise, the elite population remains unchanged.

3.5. Objective Function and Fitness Function During the process of evolution, the pros and cons of the individual are evaluated by the fitness function, which is the only basis of individual selection and guides the evolution of the algorithm. Usually, the fitness function is obtained by the linear scaling of the objective function. In this study, we take the reciprocal of the objective function value as the fitness value. If an individual has a higher fitness value, then it will be more likely to be selected as the parent population for genetic manipulation. For different problems, objective function is defined in different ways. In the problem of building displacement, three indicators are considered to construct the objective function, namely, the number of remaining conflicts between buildings and buildings, the number of remaining conflicts between buildings and roads, and the total displacement distances of all the buildings. Then, the objective function is transformed into a fitness function by a linear transformation. If after the displacement, the smaller the number of remaining conflicts between objects and the shorter the displacement distance are, then the displacement is a successful solution. The metrics are defined in detail below: Number of conflicts between buildings. For two neighboring buildings Bi and Bj, MinDist(Bi, Bj) • is the minimum distance between buildings Bi and Bj. con f (Bi, Bj) represents a spatial conflict Appl. Sci. 2020, 10, 8441 8 of 20

between buildings Bi and Bj. If MinDist(Bi, Bj) is less than then predefined distance threshold, then con f (Bi, Bj) = 1; otherwise, con f (Bi, Bj) = 0. Thus, the number of conflicts between all buildings can be expressed as:

  X Min FBB_con f (X) = con f (Bi, Bj). (4)

Number of conflicts between buildings and roads. For building Bi and road Rj, MinDist(Bi, Rj) • is the minimum distance between building Bi and road Rj, and con f (Bi, Rj) represents a spatial conflict between building Bi and road Rj. If MinDist(Bi, Rj) is less than then predefined distance threshold, then con f (Bi, Rj) = 1; otherwise, con f (Bi, Rj) = 0. Thus, the number of conflicts between buildings and roads can be expressed as:

  X Min FBR_con f (X) = con f (Bi, Rj). (5)

Total displacement distances of all the buildings. This measure is used to evaluate the positional • accuracy after displacement. The displacement must be within a certain range of the positional accuracy, and the smaller the total displacement distances are, the better the positional accuracy is maintained. The total displacement distances of all the buildings are calculated by summing the displacement distances in the X and Y directions of all the buildings. The expression is as follows:

X q q  ( ( )) = 2 + 2 Min FTotalDist X dxi dyi . (6) Finally, the objective function can be expressed in the following form:

Min(F(X)) = w F (X) + w F (X) + w F (7) BB_con f ∗ BB_con f BR_con f ∗ BR_con f TotalDist ∗ TotalDist where wBB_con f + wBR_con f + wTotalDist = 1, wBB_con f , wBR_con f , and wTotalDist are weights for the number of conflicts between buildings, number of conflicts between buildings and roads and the total displacement distances of all the buildings displaced, respectively. After the objective function is constructed, it is transformed into a fitness function by linear transformation. The objective of optimization is to select the chromosome with the maximum fitness function value. The larger the fitness function value is, the better the chromosome and the greater the probability of being selected are. 1 MaxFitness = (8) Min(F(X))

3.6. Algorithm Flowchart Based on the previous analysis, the steps of the BDMPGA can be described as follows: 1. According to the given experimental data, the number of chromosomes in each population is determined. After that, N populations are initialized by the real coding method. 2. Detect spatial conflicts. The constraint Delaunay triangulation (CDT) is used to construct the skeleton line, and then the weighted width of the skeleton line is calculated. By comparing with the minimum distance threshold, the number of conflicts between buildings and between buildings and roads are calculated. 3. Calculate the fitness value of each individual in each population. 4. Perform crossover and mutation operations on each population to produce a new population. 5. Perform immigration operations among the N population. The optimal individual and the worst individual in each population were selected according to the fitness value. Then the optimal individual in the ith population replaces the worst individual in the (i + 1)th population, so as to realize the information exchange between the two adjacent populations. Appl. Sci. 2020, 10, 8441 9 of 20

6. Perform manual selection operation on each population. The optimal individual in each population is selected by using a manual selection operation and stored in the elite population to update the elite population. 7. Judge termination condition. If the termination condition is satisfied, then the best individual in the elite population is obtained as the optimal displacement solution. If the termination condition is not satisfied, then the algorithm returns to step (2) to start the next iteration.

4. Experiments and Evaluations In this paper, the real building and road data are used to test the proposed BDMPGA. The experimental data are located in the middle part of the topographic map of Shenzhen city, China, which contains a total of 121 buildings and is located in six different blocks. The original data are shown in Figure4. The original scale of these data is 1:10,000. Due to the widening of the road to a certain width, spatial conflicts occur because the distance between buildings and roads decreases. In addition, the proposed method is implemented in the MATLAB (MathWorks, Natick, Mass, USA Version 2016a) programming language, and ArcGIS software (ESRI, Redlands, CA, USA, Version 10.2) is used to display and compare the displacement results.

Figure 4. The original experimental data (1:10,000). (a) Original data; (b) Result of widening the road.

4.1. Parameter Setting Before the experiment, some parameters need to be determined, such as the population size, maximum generation number (MaxGen), crossover probability and mutation probability, where the population size and maximum generation number (MaxGen) are related to the number of buildings and conflicts in each block. If this parameter value is set too small, then it will lead to a small number of chromosomes and too few iterations in each population, which will not be sufficiently evolved to find the optimal solution. If this parameter value is set too large, then increased running costs will ensue. Therefore, these two parameters are determined by Wilson’s research [17], which uses experimentally determined heuristics, as shown in Equations (9) and (10).

Pm = 4 Cm (9) ∗

Gm = 15 Sm (10) ∗ Appl. Sci. 2020, 10, 8441 10 of 20

where parameter Pm is the population size, Gm is the maximum generation number, and Sm and Cm represent the number of buildings and the number of conflicts in each block, respectively. In the GA, the genetic operations mainly include crossover and mutation. The frequency at which the genetic operations occur is controlled by the crossover and mutation probability, which determine the global search capability and local search capability of the algorithm. Many scholars recommend choosing a larger crossover probability and a smaller mutation probability. However, in practical applications, the specific value of the parameters is generally obtained through experiments. In this study, to compare with other algorithms, the crossover probability and mutation probability in GA and IGA are 0.8 and 0.08, respectively. Since the BDMPGA has multiple populations, the parameter values assigned to each population are different. According to the suggestion of scholars Schaffer et al. [40], the crossover probability of each population is randomly assigned within the range of [0.7, 0.9], and the mutation probability of each population is randomly assigned within the range of [0.001, 0.05]. In addition, the number of populations and the number of minimum generations of the optimal individual are all set to 10 in the BDMPGA. Because the conflict is mainly caused by the widening of the road, the principle of displacement is to maintain the accuracy of the position of the buildings as much as possible while resolving all possible conflicts. Therefore, the objective function weights are set in principle as follows wBR_con f > wBB_con f > wTotalDist. The specific value is the same as Sun’s work [27], that is, the wBR_con f is set to 30,000, the wBB_con f is set to 25,000 and the wTotalDist is set to 1. The values of the parameters used in these three methods are shown in Table1. The symbol – indicates that the corresponding method does not contain that parameter.

Table 1. Detailed parameter information of the three methods for building displacement. GA—genetic algorithm; IGA—immune genetic algorithm.

Crossover Mutation Population Maintained Generation Method Probability Probability Number Number BDMPGA [0.7, 0.9] [0.001, 0.05] 10 10 GA 0.8 0.008 - - IGA 0.8 0.008 - -

4.2. Analysis and Evaluation of Experimental Results In this experiment, we use the proposed method to resolve spatial conflicts by displacing buildings. The weighted distance of the triangulation-based skeleton is used to detect spatial conflicts, which considers the characteristics of buildings and is more cognitively appropriate than the minimum distance [24]. Figure5a shows the displacement results of the proposed BDMPGA. Figure5b shows a comparison of the original data and displacement results based on the BDMPGA, where the grey polygons are the original building data and the displacement results are represented by blue polygons. The basic statistical information of the displacement results based on the BDMPGA is listed in Table2. From Figure5 and Table2, we find that the proposed BDMPGA can e ffectively resolve all possible spatial conflicts between buildings and buildings and between buildings and roads in each block and as much as possible to ensure the positional accuracy of buildings. Appl. Sci. 2020, 10, 8441 11 of 20

Figure 5. Comparison diagram. (a) Displacement result using the proposed BDMPGA (1:10,000); (b) Comparison of the initial data and displacement results based on the BDMPGA (1:10,000).

Table 2. Statistical information of the displacement results based on the BDMPGA.

Initial Final Single Total Building Population Block MaxGen Population Displacement Number Number Conflict Conflict Size Conflict Conflict Distances (m) Number Number Number Number 1 9 0 4 222 10 16 0 0 7.53 2 26 1 15 478 10 64 0 0 35.33 3 20 1 9 347 10 40 0 0 17.55 4 23 0 13 431 10 52 0 0 40.36 5 11 2 8 198 10 40 0 0 11.51 6 14 0 11 239 10 44 0 0 20.92 103 4 60 1915 60 256 0 0 133.19

To better evaluate the displacement results of the proposed method, we implemented two other intelligent optimization algorithms to perform comparative experiments. The first method is the GA, which was used by Wilson [17] to displace buildings. The other method is the IGA, which was proposed by Sun [27] to improve the GA. The experimental results of the BDMPGA, GA, and IGA are compared using two evaluation indices: the number of unresolved conflicts and the total displacement distances of the buildings. The number of unresolved conflicts is the main evaluation index of the algorithm performance, indicating the ability of the algorithm to resolve spatial conflicts. The smaller this value is, the stronger the ability of the algorithm to resolve conflicts is. The total displacement distance indicates the disruption degree of the positional accuracy and spatial relationships. The smaller the value is, the better the positional accuracy and spatial relationship are. Figure6a shows the displacement results of the GA. Figure6b shows a comparison of the original data and displacement results based on the GA, where the grey polygons are the original building data, and the displacement results are represented by purple polygons. The basic statistical information of the displacement results based on the GA is listed in Table3. From Table3, it can be seen that the GA can resolve all the conflicts between buildings and buildings. However, it cannot resolve all the conflicts between the buildings and roads. There are three unresolved conflicts in block 2 and two unresolved conflicts in block 4. Appl. Sci. 2020, 10, 8441 12 of 20

Figure 6. Comparison diagram. (a) Displacement result using the GA (1:10,000); (b) Comparison result of the original data and displacement results based on the GA (1:10,000).

Table 3. Statistical information of the displacement results based on the GA.

Initial Final Total Building Population Block MaxGen Displacement Number Size Conflict Conflict Conflict Conflict Distances (m) Number Number Number Number 1 9 0 4 135 16 0 0 12.08 2 26 1 15 390 64 0 3 29.88 3 20 1 9 300 40 0 0 24.95 4 23 0 13 345 52 0 2 35.57 5 11 2 8 165 40 0 0 13.42 6 14 0 11 210 44 0 0 24.39 103 4 60 1545 256 0 5 140.31

Figure7a shows the displacement results of the IGA. Figure7b shows a comparison of the original data and displacement results based on the IGA, where the grey polygons are the original building data, and the displacement results are represented by cyan polygons. The basic statistical information of the displacement results based on the IGA is listed in Table4. Table4 shows that the IGA had five unresolved conflicts between buildings and roads, located in block 2, block 4, and block 5. More seriously, the IGA generates secondary conflicts. Through comparison, it is found that the BDMPGA has a stronger ability to resolve spatial conflicts. Appl. Sci. 2020, 10, 8441 13 of 20

Figure 7. Comparison diagram. (a) Displacement result using the IGA (1:10,000); (b) Comparison result of the original data and displacement results based on the IGA (1:10,000).

Table 4. Statistical information of the displacement results based on the IGA.

Initial Final Total Building Population Block MaxGen Displacement Number Size Conflict Conflict Conflict Conflict Distances (m) Number Number Number Number 1 9 0 4 135 16 0 0 14.24 2 26 1 15 390 64 0 1 43.20 3 20 1 9 300 40 0 0 23.04 4 23 0 13 345 52 1 3 29.70 5 11 2 8 165 40 0 1 13.30 6 14 0 11 210 44 0 0 26.24 103 4 60 1545 256 1 5 149.71

Although these methods can be used to displace buildings and resolve spatial conflicts, they yield different displacement results (e.g., displacement distance and displacement direction) at some local regions. To better illustrate the differences in the displacement results of the various methods, we selected some typical regions to display the corresponding detailed information, such as the regions marked with red circles in Figures5–7. Table5 shows the detailed information of the displacement results in these typical regions using the proposed BDMPGA method and the two comparative methods (i.e., GA and IGA). Table5 indicates the following:

1. Compared with the GA and the IGA, the proposed BDMPGA can generate more reasonable displacement results. For example, as shown in local area No.A in Table5, when a building is located at an acute corner and is conflicted with multiple roads, the BDMPGA can better solve the conflict by moving a longer distance, and the displacement direction is the resultant direction of multiple conflicting roads. When a building is located at an obtuse corner and is conflicted with multiple roads, as shown in local area No.B in Table5, the BDMPGA will make the building move a short distance to resolve the conflict. However, the GA cannot resolve multiple conflicts and even aggravate the conflicts. The IGA method only resolves some of the conflicts. 2. The proposed BDMPGA has a better ability than the GA and IGA to maintain building positional accuracy. For example, as show in local area No.C in Table5, the IGA tends to move long distances to resolve the conflict. However, the proposed BDMPGA only makes the conflict building move a shorter distance and satisfies the constraint condition of ensuring the positional accuracy of the Appl. Sci. 2020, 10, 8441 14 of 20

building as much as possible while resolving the spatial conflicts. Table6 shows the basic statistical information of the displacement distance for each method. As seen from the statistical information, the BDMPGA has a minimum displacement distance of 0.0 m, meaning that if a building does not conflict with surrounding objects, then it is not moved. The maximum displacement distance of the BDMPGA is 3.99 m, which meets the specified maximum displacement distance threshold (e.g., 0.5 mm). The total displacement distance of the BDMPGA is 133.19 m, less than 140.31 m of the GA and 149.71 m of the IGA, indicating that the positional accuracy of the BDMPGA is maintained well.

Table 5. Comparison of typical displacement examples based on the three different methods.

Local Area No BDMPGA GA IGA

No.A

No.B

No.C

Table 6. Statistics of the displacement distance of each method.

Methods Minimum (m) Maximum (m) Total (m) Mean (m) Std (m) GA 0.01 4.30 140.31 1.36 1.34 IGA 0.02 4.63 149.71 1.45 1.38 BDMPGA 0.00 3.99 133.19 1.29 1.37

Successful displacement should not only solve all possible spatial conflicts and avoid generating secondary conflicts after displacing some buildings but also preserve the important arrangement and distribution patterns of buildings. To better demonstrate the differences between the proposed BDMPGA and the other two comparative methods in maintaining the arrangement and distribution pattern of buildings, some typical examples are chosen, as shown in Figures8 and9, which indicate the following:

1. Compared with the GA and IGA, the proposed BDMPGA can maintain the relative position between buildings during the displacement. For example, Figure8a shows the displacement results of the BDMPGA, and the displacement results of the GA and the IGA are Figure8b,c, Appl. Sci. 2020, 10, 8441 15 of 20

respectively. By comparison, it can be seen that although both the GA and IGA can resolve spatial conflicts, the distance relations among buildings are changed after the displacement so that some buildings become closer (with the GA), while some become farther away (with the IGA). However, the proposed BDMPGA exhibits a good ability to avoid changing the relative position of the buildings because the conflicting buildings are all moving in the same direction and distance. Meanwhile, as shown in Figure8d–f, two adjacent buildings are in conflict with the road, the GA and the IGA only move one building, and the conflict between the other buildings remains unresolved. At the same time, the GA increases the distance between buildings and the IGA produces a more serious secondary conflict. However, the proposed BDMPGA moves two buildings simultaneously and resolves all conflicts, which can keep the relative positions between buildings unchanged. 2. Compared with the GA and IGA, the proposed BDMPGA can better maintain the linear arrangement and distribution pattern of buildings. For example, as shown in Figure9, the comparative methods, including the GA and IGA, only move some buildings in the building group, which not only fails to solve all the spatial conflicts but also fails to maintain the arrangement and distribution pattern of the building group. However, the proposed BDMPGA has a better ability to overcome the shortcomings of the comparative methods because the BDMPGA takes the least preserving generation of the optimal individual as the termination condition, and the method will constantly optimize the shortest displacement distance after resolving spatial conflicts to ensure that the arrangement and distribution pattern of buildings do not change.

Figure 8. Contrast in detail using the proposed BDMPGA and the other two methods. (a–c) Results of maintaining the relative position between buildings of local region 1 using the BDMPGA, GA and IGA, respectively; (d–f) Results of maintaining the relative position between buildings of local region 2 using the BDMPGA, GA and IGA, respectively. Appl. Sci. 2020, 10, 8441 16 of 20

Figure 9. Contrast in detail using the proposed BDMPGA and the other two methods. (a) Result of linear arrangement and distribution pattern of buildings using BDMPGA; (b) Result of linear arrangement and distribution pattern of buildings using GA; (c) Result of linear arrangement and distribution pattern of buildings using IGA.

Furthermore, to statistically evaluate the stability and convergence rate of the proposed BDMPGA, Figure 10 shows the iterative process of different methods in each block. From Figure 10, we can see that the proposed BDMPGA is very stable and converges very fast. This method only needs a few iterations to reach the optimal value.

Figure 10. Cont. Appl. Sci. 2020, 10, 8441 17 of 20

Figure 10. Comparison of the optimal fitness value in the iterative process from the three different methods. (a–f) Result of the optimal fitness value in the iterative process of block 1–6.

4.3. Limitations When using the BDMPGA to resolve spatial conflicts, there must be enough displacement space. If the density of buildings in the block is too high, there is not enough displacement space around the conflicting buildings, then other generalization operations, such as elimination, aggregation, and typification, are required to resolve the spatial conflicts. As show in Figure 11a, when the road is symbolized, it creates overlap conflicts with the adjacent buildings. In this case, the displacement operator cannot resolve the spatial conflicts, and the size reduction operation can be used to change the size of the buildings to resolve the spatial conflicts, as shown in Figure 11b. As shown in Figure 11c, when a group of buildings in regular arrangement have spatial conflicts with the road, the typification operation can be adopted to replace them with fewer buildings to resolve the spatial conflict on the premise of maintaining the spatial arrangement pattern of the buildings, as shown in Figure 11d. Future research aims to extend the implementation of our proposed approach by combining it with other contextual generalization operations to resolve more complex conflict cases.

Figure 11. Other generalization operation examples. (a) Case of overlap conflict; (b) Result using the size reduction operation; (c) Case of overlap conflict; (d) Result using the typification operation. Appl. Sci. 2020, 10, 8441 18 of 20

5. Conclusions This paper proposes a novel building displacement method based on multipopulation genetic algorithm (BDMPGA) to resolve spatial conflicts. The BDMPGA introduces multiple populations, each population can set different crossover probability and mutation probability, so that the algorithm can give consideration to both local search ability and global search ability. The immigration operation introduces the optimal individual in the population to other populations to realize the information exchange between different populations and ensure the diversity of individuals. The optimal individual in each population is preserved in the elite population by manual selection operation to avoid it being destroyed and lost in the evolutionary process. The premature convergence of traditional GA is overcome by coevolution of multiple populations to get the optimal solution. Compared with the GA and IGA, the BDMPGA can solve all possible spatial conflicts in each block and avoid generating secondary spatial conflicts. The total displacement distances produced by the BDMPGA are smaller than those produced by the GA and IGA. Additionally, the BDMPGA can preserve the spatial positional relationships and linear arrangement patterns between objects. This method uses the idea of combinatorial optimization to resolve the spatial conflicts between buildings and between buildings and roads, which can provide theoretical and technical support for improving the automation and intelligence level of cartographic generalization. A possible shortcoming of the BDMPGA is that it needs several iterations to obtain the optimal solution, which requires a longer running time. The sequential methods only displace the conflicting objects once to resolve the spatial conflicts. To decrease the running time of the BDMPGA, the most commonly adopted strategies are to divide the whole displacement space into different regions by using natural features, such as road networks or river networks, or by using clustering methods. Then the algorithm can be applied to each region to accelerate the processing speed. Of course, in the application of network mapping and vehicle navigation, it is necessary to introduce parallel computing and other new technologies for online real-time displacement.

Author Contributions: Methodology implementation, data acquisition, and formal analysis: W.L. and T.A.; Writing—original draft preparation: W.L.; Writing—review and editing: Y.S.; W.Y.; and W.W. All authors have read and agreed to the published version of the manuscript. Funding: This project was funded by the National Natural Science Foundation of China (No. 41531180; No. 42001402). Conflicts of Interest: The authors declare no conflict of interest.

References

1. Wang, L.; Guo, Q.; Liu, Y.; Sun, Y.; Wei, Z. Contextual Building Selection Based on a Genetic Algorithm in Map Generalization. ISPRS Int. J. Geo Inf. 2017, 6, 271. [CrossRef] 2. Ai, T.; Yin, H.; Shen, Y.; Yang, M.; Wang, L. A formal model of neighborhood representation and applications in urban building aggregation supported by Delaunay triangulation. PLoS ONE 2019, 14, e218877. [CrossRef] [PubMed] 3. Shen, Y.; Ai, T.; Li, W.; Yang, M.; Feng, Y. A polygon aggregation method with global feature preservation using superpixel segmentation. Comput. Environ. Urban Syst. 2019, 75, 117–131. [CrossRef] 4. Li, Z.; Choi, Y.H. Topographic Map Generalization: Association of Road Elimination with Thematic Attributes. Cartogr. J. 2002, 39, 153–166. [CrossRef] 5. Regnauld, N. Contextual Building Typification in Automated Map Generalization. Algorithmica 2001, 30, 312–333. [CrossRef] 6. Shen, Y.; Ai, T.; Li, J.; Wang, L.; Li, W. A tile-map-based method for the typification of artificial polygonal water areas considering the legibility. Comput. Geosci. 2020, 143, 104552. [CrossRef] 7. Ai, T.A. Displacement of Building Cluster Based on Field Analysis. Acta Geodaetica Cartogr. Sin. 2004, 33, 89–94. 8. Qi, Z.; Tinghua, A.; Xiang, Z. A Displacement Field Model to Resolve Multiple Spatial Conflicts. Acta Geodaetica Cartogr. Sin. 2013, 42, 615–620. Appl. Sci. 2020, 10, 8441 19 of 20

9. Feng, Y.; Thiemann, F.; Sester, M. Learning Cartographic Building Generalization with Deep Convolutional Neural Networks. ISPRS Int. J. Geo Inf. 2019, 8, 258. [CrossRef] 10. Yan, X.; Ai, T.; Yang, M.; Yin, H. A graph convolutional neural network for classification of building patterns using spatial vector data. ISPRS J. Photogramm. 2019, 150, 259–273. [CrossRef] 11. Ware, J.M.; Jones, C.B.; Thomas, N. Automated map generalization with multiple operators: A simulated annealing approach. Int. J. Geogr. Inf. Sci. 2003, 17, 743–769. [CrossRef] 12. Jones, C.B.; Mark Ware, J. Map generalization in the Web age. Int. J. Geogr. Inf. Sci. 2005, 19, 859–870. [CrossRef] 13. Yu, L. Analysis of 30 Cases of MATLAB Intelligent Algorithm, 2rd ed.; Beijing University of Aeronautics and Astronautics Press: Beijing, China, 2011. 14. Lu, F.; Deng, J.; Li, S.; Deng, H. A Hybrid of Differential Evolution and Genetic Algorithm for the Multiple Geographical Feature Label Placement Problem. ISPRS Int. J. Geo-Inf. 2019, 8, 237. [CrossRef] 15. Chehreghan, A.; Ali Abbaspour, R. A geometric-based approach for road matching on multi-scale datasets using a genetic algorithm. Cartogr. Geogr. Inf. Sci. 2017, 45, 255–269. [CrossRef] 16. Zhang, L.; Guilbert, E. A Genetic Algorithm for Tributary Selection with Consideration of Multiple Factors. Trans. GIS 2016, 21, 332–358. [CrossRef] 17. Wilson, I.D.; Ware, J.M.; Ware, J.A. A Genetic Algorithm approach to cartographic map generalisation. Comput. Ind. 2003, 52, 291–304. [CrossRef] 18. Ware, J.M.; Wilson, I.D.; Ware, J.A. A knowledge based genetic algorithm approach to automating cartographic generalisation. Knowl. Based Syst. 2003, 16, 295–303. [CrossRef] 19. Lichtner, W. Computer-assisted processes of cartographic generalization in topographic maps. Geo-Processing 1979, 1, 183–199. 20. Mackaness, W.A. An Algorithm for Conflict Identification and Feature Displacement in Automated Map Generalization. Cartogr. Geogr. Inf. Syst. 1994, 21, 219–232. [CrossRef] 21. Ruas, A. A method for building displacement in automated map generalisation. Int. J. Geogr. Inf. Sci. 1998, 12, 789–803. [CrossRef] 22. Fei, L. Solving graphic conflicts between streets and buildings in map compilation by simulating human cartographers. Geomat. Inf. Sci. Wuhan Univ. 2004, 29, 426–432. 23. Basaraner, M. A zone-based iterative building displacement method through the collective use of Voronoi Tessellation, spatial analysis and multicriteria decision making. Boletim de Ciências Geodésicas 2011, 17, 161–187. [CrossRef] 24. Ai, T.; Zhang, X.; Zhou, Q.; Yang, M. A vector field model to handle the displacement of multiple conflicts in building generalization. Int. J. Geogr. Inf. Sci. 2015, 29, 1310–1331. [CrossRef] 25. Ware, J.M.; Jones, C.B. Conflict Reduction in Map Generalization Using Iterative Improvement. GeoInformatica 1998, 2, 383–407. [CrossRef] 26. Ware, J.; Wilson, I.; Ware, J.; Jones, C. A tabu search approach to automated map generalization. In Proceedings of the ACM-GIS 2002, Tenth ACM International Symposium on Advances in Geographic Information Systems, McLean, VA, USA, 8–9 November 2002; pp. 101–106. 27. Sun, Y.; Guo, Q.; Liu, Y.; Ma, X.; Weng, J. An Immune Genetic Algorithm to Buildings Displacement in Cartographic Generalization. Trans. GIS 2016, 20, 585–612. [CrossRef] 28. Huang, H.; Guo, Q.; Sun, Y.; Liu, Y. Reducing Building Conflicts in Map Generalization with an Improved PSO Algorithm. ISPRS Int. J. Geo-Inf. 2017, 6, 127. [CrossRef] 29. Harrie, L.; Sarjakoski, T. Simultaneous Graphic Generalization of Vector Data Sets. GeoInformatica 2002, 6, 233–261. [CrossRef] 30. Harrie, L.E. The Constraint Method for Solving Spatial Conflicts in Cartographic Generalization. Cartogr. Geogr. Inf. Sci. 1999, 26, 55–69. [CrossRef] 31. Harrie, L. Weight-Setting and Quality Assessment in Simultaneous Graphic Generalization. Cartogr. J. 2003, 40, 221–233. [CrossRef] 32. Sester, M. Optimization approaches for generalization and data abstraction. Int. J. Geogr. Inf. Sci. 2005, 19, 871–897. [CrossRef] 33. Højholt, P. Solving Space Conflicts in Map Generalization: Using a Finite Element Method. Cartogr. Geogr. Inf. Sci. 2000, 27, 65–74. [CrossRef] Appl. Sci. 2020, 10, 8441 20 of 20

34. Burghardt, D.; Meier, S. Cartographic displacement using the snakes concept. In Semantic Modeling for the Acquisition of Topographic Information from Images and Maps; Birkhäuser: Basel, Switzerland, 1997; pp. 114–120. 35. Wang, L.; Guo, Q.; Wei, Z.; Liu, Y. Spatial Conflict Resolution in a Multi-Agent Process by the Use of a Snake Model. IEEE Access 2017, 5, 24249–24261. [CrossRef] 36. Bader, M. Energy Minimization Methods for Feature Displacement in Map Generalization. Ph.D. Thesis, University of Zurich, Zurich, Germany, 2001. 37. Bader, M.; Barrault, M.; Weibel, R. Building displacement over a ductile truss. Int. J. Geogr. Inf. Sci. 2005, 19, 915–936. [CrossRef] 38. Liu, Y.; Guo, Q.; Sun, Y.; Ma, X. A Combined Approach to Cartographic Displacement for Buildings Based on Skeleton and Improved Elastic Beam Algorithm. PLoS ONE 2014, 9, e113953. [CrossRef][PubMed] 39. Michalewicz, Z.; Janikow, C.Z.; Krawczyk, J.B. A modified genetic algorithm for optimal control problems. Comput. Math. Appl. 1992, 23, 83–94. [CrossRef] 40. Schaffer, J.D.; Caruana, R.; Eshelman, L.J.; Das, R. A study of control parameters affecting online performance of genetic algorithms for function optimization. In Proceedings of the Third International Conference on Genetic Algorithms; Morgan Kaufmann Publishers Inc.: San Francisco, CA, USA, 1989; pp. 51–60.

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).