# Contextual Building Selection Based on a Genetic Algorithm in Map Generalization

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Related Work

## 3. Cartographic Selection from a GA Perspective

#### 3.1. GA Summary

- Encoding: transforming solutions of a problem into gene representations.
- Initialization: generating a set of chromosomes that represent optional solutions to the problem.
- Selection: selecting individuals from the current population as parents for reproduction, based on their fitness values.
- Crossover: producing children by recombining the genes of two parents.
- Mutation: randomly selecting genes in an individual and replacing them by their allele to ensure diversity.
- Termination criterion: stopping the algorithm when the algorithm converges or when the number of iterations reaches a pre-specified value.

- Definition and expression of the solution to the problem, namely how to design the genes of an individual in the GA.
- Choice of appropriate genetic operators, such as selection, crossover, mutation, etc., to evolve the population of solutions.
- Definition of a fitness function to evaluate the quality of the solution with respect to a practical problem.

#### 3.2. Selection Constraints

^{2}[43].

#### 3.3. An Improved GA

#### 3.3.1. Encoding

_{1}, B

_{2}, B

_{3}} is the conflicting block of building B

_{2}(expressed as CB(B

_{2})). Similarly, CB(B

_{4}) includes B

_{3}, B

_{4}and B

_{5}. If B

_{2}is included in a solution, then B

_{1}and B

_{3}should not be selected.

#### 3.3.2. Crossover and Mutation by Considering Conflicting Blocks

_{2}are swapped, the situation changes such that conflicts occur in one of the generated sub-chromosomes.

_{3}is the overlapping building of CB(B

_{2}) and CB(B

_{4}). Since the gene values of B

_{2}on the two chromosomes are not the same, genes (drawn in gray) for CB(B

_{2}) in two parents are all exchanged. After that, a conflict arises between B

_{3}and B

_{4}. The conflict is then removed through local optimizing. B

_{4}is discarded because the size of the conflicting block of B

_{4}is the same as that of B

_{3}, but its area is smaller.

#### 3.3.3. Objective Function and Fitness Function

_{1}represents the absolute value of range variation, Rng represents the area of the distribution range of buildings at the target scale when the selection is not performed, and r represents the area of the range polygon of any individual in the GA. Minimizing f

_{1}produces a more attractive selection result.

_{2}represents the absolute value of the building density variation, Den represents the building density before selection, and d represents the building density of any individual in the GA. Minimizing f

_{2}produces a more attractive selection result.

_{1}and w

_{2}represent the weight values of f

_{1}and f

_{2}, respectively. The larger the weight value, the greater the effect on the objective function. For different selection units, the magnitudes of f

_{1}and f

_{2}may be different, so fixed weights are not desirable. Here, the adaptive weights approach proposed by Cheng et al. [47] is adopted. This method assigns weights to each objective function adaptively according to the current population. The adaptive weight for objective i can be calculated by the following equation:

_{max}is the maximum estimate of the objective score, and f is the objective function value. The value of c

_{max}is critical for ensuring that Fit (f) is non-negative; otherwise, the problem may appear in the selection stage of the GA. According to the estimation of Equation (5), the value of c

_{max}is 2.

## 4. Implementation of the Proposed Method

#### 4.1. Extraction of Selection Units

#### 4.2. Building Enlargement

- Rule 1.
- If the graphic length and graphic width of a building are less than 0.7 mm and 0.5 mm, respectively, then replace the building with a predefined symbol of the appropriate size and orientation.
- Rule 2.
- If the graphic length of a building is larger than 0.7 mm, but its graphic width is less than 0.5 mm, then expand its symbol width to 0.5 mm. Similarly, if the graphic width of a building is larger than 0.5 mm, but its graphic length is less than 0.7 mm, then expand its symbol length to 0.7 mm.
- Rule 3.
- If the graphic length and graphic width of a building are larger than 0.7 mm and 0.5 mm, respectively, then represent them with their original outline.

#### 4.3. Local Displacement

- A C-type building is one that is located at a road corner and overlaps at least one of the roads.
- An E-type building is one that is located on one side of the road and only overlaps one of the roads.

_{1}and d

_{2}, where d

_{1}is the nearest distance from the original building to the road, and d

_{2}is the maximum distance that the enlarged building covers the road. To avoid the violation of constraint C4, it is necessary to check the displacement magnitude before a building is displaced. Once the displacement magnitude exceeds 0.5 mm, the building should be removed instead of being displaced.

#### 4.4. Conflict Detection among Buildings

#### 4.5. Enrichment of Geometric Attributes

- (1)
- A type I building is determined by simple area calculation and comparison to the minimum size threshold. According to the National Administration of Surveying [43], buildings with an area of more than 0.35 mm
^{2}are considered to be of this type. - (2)
- A type II building is identified on the basis of detecting the proximity relationship among buildings and roads. Before performing the GA on a selection unit, a proximity graph is constructed using the method proposed by Liu et al. [51]. It is then possible to obtain information as to whether a building is adjacent to a road and how close it is. Utilizing the information, a building that is adjacent to two or more roads and whose proximity distance to each road is less than a certain threshold (e.g., 15 m) can be defined as a type II building.
- (3)
- To identify a type III building, the boundary of a settlement should be defined first. A boundary deriving method proposed by Yan and Weibel [17] is adopted after converting the building group to a point cluster. The buildings that overlap the generated boundary are called the boundary buildings. A type III building can be derived from these boundary buildings by performing a line reduction algorithm on the boundary line. The Douglas–Peucker algorithm [52] is preferred because it keeps all the key points that make up the basic shape of a line and removes the other points. The simplified tolerance in the algorithm is set to 25 m by experiment. The buildings corresponding to the points retained on the simplified line will be type III buildings.

#### 4.6. Selection Based on the GA

#### 4.6.1. Initialization

- (1)
- Mark all genes as ‘free’;
- (2)
- Assign the gene values corresponding with the must-be-selected buildings as 1 s and mark these genes as ‘fixed’;
- (3)
- Assign the gene values corresponding with the must-be-discarded buildings as 0 s and mark these genes as ‘fixed’;
- (4)
- Repeat the following steps until the number of genes assigned as 1 s reaches the target selection number or all the genes are marked as ‘fixed’;
- (4.1)
- Randomly select a ‘free’ building B and assign its gene as 1, then mark the gene as ‘fixed’;
- (4.2)
- Identify ‘free’ buildings from CB(B), assign the corresponding genes as 0 s and mark these genes as ‘fixed’;

_{t}is the number of buildings in the target map, N

_{s}is the number of buildings in the source map, M

_{s}is the denominator of the source scale, and M

_{t}is the denominator of the target scale.

#### 4.6.2. Selection, Crossover, and Mutation

_{c}and mutation probability P

_{m}remains a problem. The crossover probability indicates the probability that crossover operation will occur on two selected parents. If the value is set too high, individuals with high fitness can easily be destroyed. However, too small a crossover probability will slow down the search process. The mutation probability determines the probability that a gene value in an individual is altered. The GA becomes a random search algorithm when the mutation probability is set too high, since the gene information is easy to change. Too low a mutation probability will reduce the local search capability of the algorithm. In this paper, the crossover probability is set to 0.8, and the mutation probability is set to 0.1, which have been determined through experimental testing.

#### 4.6.3. Iteration and the Elite Retention Strategy

_{m}, where G

_{m}is set using an experimentally determined threshold, namely 30 (at 1:25,000) and 50 (at 1:50,000).

## 5. Results and Analysis

#### 5.1. Experimental Results

^{®}Core™ i5-4460 CPU (3.20 GHz).

#### 5.2. Analysis

#### 5.2.1. Local Constraints

^{2}in the real world. Such a large building is very rare in rural areas. In this paper, the semantic attributes of buildings are lacking. As for a dataset with rich semantic attributes, the approach can be easily extended to include these semantically important buildings.

#### 5.2.2. Contextual Constraint of Spatial Relationships and Patterns

## 6. Conclusions and Future Work

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- McMaster, R.B.; Shea, K.S. Generalization in digital cartography. In Spatial Data Handling; Association of American Geographers: Washington, DC, USA, 1992; pp. 6.1–6.18. [Google Scholar]
- Ruas, A.; Plazanet, C. Strategies for automated generalization. In Proceedings of the 7th International Symposium on Spatial Data Handling, Delft, The Netherlands, 12–16 August 1996. [Google Scholar]
- Brassel, K.E.; Weibel, R. A review and conceptual framework of automated map generalization. Int. J. Geogr. Inf. Syst.
**1988**, 2, 229–244. [Google Scholar] [CrossRef] - Mackaness, W.A. An algorithm for conflict identification and feature displacement in automated map generalization. Cartogr. Geogr. Inf. Syst.
**1994**, 21, 219–232. [Google Scholar] [CrossRef] - Ruas, A. A method for building displacement in automated map generalisation. Int. J. Geogr. Inf. Syst.
**1998**, 12, 789–803. [Google Scholar] [CrossRef] - Lonergan, M.; Jones, C.B. An iterative displacement method for conflict resolution in map generalization. Algorithmica
**2001**, 30, 287–301. [Google Scholar] [CrossRef] - Harrie, L.; Sarjakoski, T. Simultaneous graphic generalization of vector data sets. GeoInformatica
**2002**, 6, 233–261. [Google Scholar] [CrossRef] - Bader, M.; Barrault, M.; Weibel, R. Building displacement over a ductile truss. Int. J. Geogr. Inf. Sci.
**2005**, 19, 915–936. [Google Scholar] [CrossRef] - 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. [Google Scholar] [CrossRef] - Ai, T.; Zhang, X. The aggregation of urban building clusters based on the skeleton partitioning of gap space. In The European Information Society; Fabrikant, S., Wachowicz, M., Eds.; Springer: Aalborg, Denmark, 2007; pp. 153–170. [Google Scholar]
- Regnauld, N. Contextual building typification in automated map generalization. Algorithmica
**2001**, 30, 312–333. [Google Scholar] [CrossRef] - Yan, H.; Weibel, R.; Yang, B. A multi-parameter approach to automated building grouping and generalization. Geoinformatica
**2008**, 12, 73–89. [Google Scholar] [CrossRef] - Kadmon, N. Automated selection of settlements in map generalisation. Cartogr. J.
**1972**, 9, 93–98. [Google Scholar] [CrossRef] - Langran, G.E.; Poiker, T.K. Integration of name selection and name placement. In Proceedings of the 2nd International Symposium on Spatial Data Handling, Seattle, WA, USA, 5–10 July 1986; International Geographical Union and International Cartographic Association: Seattle, WA, USA, 1986; pp. 50–64. [Google Scholar]
- Ai, T.; Liu, Y. Analysis and simplification of point cluster based on delaunay triangulation model. In Advances in Spatial Analysis and Decision Making; Li, Z., Zhou, Q., Kainz, W., Eds.; Taylor & Francis: London, UK, 2003; pp. 9–18. [Google Scholar]
- Qian, H.; Meng, L. Polarization transformation as an algorithm for automatic generalization and quality assessment. In Proceedings of the SPIE 6751, Geoinformatics 2007: Cartographic Theory and Models, Nanjing, China, 25–27 May 2007; Li, M., Wang, J., Eds.; The International Society for Optical Engineering: Nanjing, China, 2007; Volume 67510Y. [Google Scholar]
- Yan, H.; Weibel, R. An algorithm for point cluster generalization based on the voronoi diagram. Comput. Geosci.
**2008**, 34, 939–954. [Google Scholar] [CrossRef] - Peters, S. Quadtree-and octree-based approach for point data selection in 2D or 3D. Ann. GIS
**2013**, 19, 37–44. [Google Scholar] [CrossRef] - Yan, H.; Li, J. An approach to simplifying point features on maps using the multiplicative weighted voronoi diagram. J. Spat. Sci.
**2013**, 58, 291–304. [Google Scholar] [CrossRef] - Bjørke, J.T. Framework for entropy-based map evaluation. Cartogr. Geogr. Inf. Syst.
**1996**, 23, 78–95. [Google Scholar] [CrossRef] - Ruas, A. Modèle de Généralisation de Données Géographiques à Base de Contraintes et D’autonomie. Ph.D. Thesis, Université de Marne la Vallée, Marne La Vallée, France, 1999. [Google Scholar]
- Burghardt, D.; Cecconi, A. Mesh simplification for building typification. Int. J. Geogr. Inf. Sci.
**2007**, 21, 283–298. [Google Scholar] [CrossRef] - Gong, X.; Wu, F. A typification method for linear pattern in urban building generalisation. Geocarto Int.
**2016**, 1–19. [Google Scholar] [CrossRef] - Sester, M. Optimization approaches for generalization and data abstraction. Int. J. Geogr. Inf. Sci.
**2005**, 19, 871–897. [Google Scholar] [CrossRef] - Li, Z.; Yan, H.; Ai, T.; Chen, J. Automated building generalization based on urban morphology and gestalt theory. Int. J. Geogr. Inf. Sci.
**2004**, 18, 513–534. [Google Scholar] [CrossRef] - Steiniger, S.; Taillandier, P.; Weibel, R. Utilising urban context recognition and machine learning to improve the generalisation of buildings. Int. J. Geogr. Inf. Sci.
**2010**, 24, 253–282. [Google Scholar] [CrossRef][Green Version] - Holland, J.H. Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence; MIT Press: Cambridge, MA, USA, 1992. [Google Scholar]
- Goldberg, D.E. Genetic Algorithms in Search, Optimization, and Machine Learning; Addison-Wesley Longman Publishing Co., Inc.: Boston, MA, USA, 1989. [Google Scholar]
- Wilson, I.D.; Ware, J.M.; Ware, J.A. A genetic algorithm approach to cartographic map generalisation. Comput. Ind.
**2003**, 52, 291–304. [Google Scholar] [CrossRef] - 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. [Google Scholar] [CrossRef] - 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. [Google Scholar] [CrossRef] - Van Dijk, S.; Thierens, D.; De Berg, M. Using genetic algorithms for solving hard problems in GIS. GeoInformatica
**2002**, 6, 381–413. [Google Scholar] [CrossRef] - Wu, F.; Deng, H.-Y. Using genetic algorithms for solving problems in automated line simplification. Acta Geodaetica Cartogr. Sin.
**2003**, 4, 013. [Google Scholar] - Lamy, S.; Ruas, A.; Demazeau, Y.; Jackson, M.; Mackaness, W.; Weibel, R. The application of agents in automated map generalisation. In Proceedings of the 19th ICA Meeting, Ottawa, ON, Canada, 14–21 August 1999; Volume 14, pp. 1–8. [Google Scholar]
- Duchêne, C.; Ruas, A.; Cambier, C. The cartacom model: Transforming cartographic features into communicating agents for cartographic generalisation. Int. J. Geogr. Inf. Sci.
**2012**, 26, 1533–1562. [Google Scholar] [CrossRef] - Jones, C.B.; Bundy, G.L.; Ware, M.J. Map generalization with a triangulated data structure. Cartogr. Geogr. Inform.
**1995**, 22, 317–331. [Google Scholar] - Topfer, F.; Pillewizer, W. The principles of selection. Cartogr. J.
**1966**, 3, 10–16. [Google Scholar] [CrossRef] - Christophe, S.; Ruas, A. Detecting building alignments for generalisation purposes. In Advances in Spatial Data Handling; Richardson, D.E., Oosterom, P.V., Eds.; Springer: Berlin/Heidelberg, Germany, 2002; pp. 419–432. [Google Scholar]
- Regnauld, N. Recognition of building clusters for generalization. In Proceedings of the 7th International Symposium on Spatial Data Handling, Delft, The Netherlands, 12–16 August 1996; Kraak, M.-J.M.M., Ed.; Taylor & Francis: London, UK, 1996; Volume 1, pp. 185–198. [Google Scholar]
- Anders, K.-H.; Sester, M. Parameter-free cluster detection in spatial databases and its application to typification. Int. Arch. Photogramm. Remote Sens.
**2000**, 33, 75–83. [Google Scholar] - Basaraner, M.; Selcuk, M. A structure recognition technique in contextual generalisation of buildings and built-up areas. Cartogr. J.
**2008**, 45, 274–285. [Google Scholar] [CrossRef] - Zhang, X.; Ai, T.; Stoter, J.; Kraak, M.-J.; Molenaar, M. Building pattern recognition in topographic data: Examples on collinear and curvilinear alignments. Geoinformatica
**2013**, 17, 1–33. [Google Scholar] [CrossRef] - National Administration of Surveying, Mapping and Geoinformation of China. Cartographic Symbols for National Fundamental Scale Map-Part3: Specifications for Cartographic Symbols 1:25,000, 1:50,000 & 1:100,000 Topographic Maps; China Zhijian Publishing House: Beijing, China, 2006.
- Swiss Society of Cartography. Topographic Maps: Map Graphics and Generalization; Federal Office of Topography: Berne, Switzerland, 2005.
- National Administration of Surveying, Mapping and Geoinformation of China. Compilation Specification for National Fundamental Scale Maps-Part1: Complilation Specifications for 1:25,000, 1:50,000 & 1:100,000 Topographic Maps; China Zhijian Publishing House: Beijing, China, 2008.
- Regnauld, N. Preserving density contrasts during cartographic generalization. In GIS and Geocomputation; Peter, M., David, M., Eds.; Taylor & Francis: London, UK, 2000; pp. 175–186. [Google Scholar]
- Cheng, R.; Gen, M.; Oren, S.S. An adaptive hyperplane approach for multiple objective optimization problems with complex constraints. In Proceedings of the 2nd Annual Conference on Genetic and Evolutionary Computation, Las Vegas, NV, USA, 10–12 July 2000; Whitley, L.D., Goldberg, D.E., Cantú-Paz, E., Spector, L., Parmee, I.C., Eds.; Morgan Kaufmann Publishers Inc.: Las Vegas, NV, USA, 2000; pp. 299–306. [Google Scholar]
- Boffet, A. Méthode de Création D’Informations Multi-Niveaux Pour la Généralisation Cartographique de L’urbain. Ph.D. Thesis, Université de Marne la Vallée, Marne La Vallée, France, 2001. [Google Scholar]
- Bader, M. Energy Minimization Methods for Feature Displacement in Map Generalization. Ph.D. Thesis, University of Zurich, Zurich, Switzerland, 2001. [Google Scholar]
- Nickerson, B.G. Automated cartographic generalization for linear features. Int. J. Geogr. Inf. Geovis.
**1988**, 25, 15–66. [Google Scholar] [CrossRef] - 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. [Google Scholar] [CrossRef] [PubMed] - Douglas, D.H.; Peucker, T.K. Algorithms for the reduction of the number of points required to represent a digitized line or its caricature. Int. J. Geogr. Inf. Geovis.
**1973**, 10, 112–122. [Google Scholar] [CrossRef] - Jong, K.A.D. An Analysis of the Behavior of a Class of Genetic Adaptive Systems. Ph.D. Thesis, University of Michigan, Ann Arbor, MI, USA, 1975. [Google Scholar]

**Figure 6.**Encoding for a group of aligned buildings. r’ is half the minimum distance threshold for detecting conflicts.

**Figure 11.**Extraction of selection units: (

**a**) building buffering; (

**b**) merging of buffered polygons; (

**c**) conducting an overlap with roads; (

**d**) conducting an overlap with buildings; (

**e**) assigning buildings and roads to form selection units.

**Figure 13.**Building enlargement process: (

**a**) original buildings; (

**b**) SMBRs; (

**c**) first rotation; (

**d**) simple geometric transformation; (

**e**) second rotation; (

**f**) buildings after enlargement compared to their initial states.

**Figure 15.**Determination of the building displacement vector for: (

**a**) a C-type building; (

**b**) an E-type building.

**Figure 16.**The buffer-based approach for detecting conflicts. r’ is half the minimum distance threshold for detecting conflicts.

**Figure 18.**Test results of selection unit A: (

**a**) visual reduction without selection (1:25,000), (

**b**) selection result using the GA (1:25,000), and (

**c**) selection results enlarged to 1:10,000 from 1:25,000.

**Figure 19.**Test results of selection unit A: (

**a**) visual reduction without selection (1:50,000), (

**b**) selection result using the GA (1:50,000), and (

**c**) selection result enlarged to 1:10,000 from 1:50,000.

**Figure 20.**Test results of selection unit B: (

**a**) visual reduction without selection (1:25,000), (

**b**) selection result using the GA (1:25,000), and (

**c**) selection result enlarged to 1:10,000 from 1:25,000.

**Figure 21.**Test results of selection unit B: (

**a**) visual reduction without selection (1:50,000), (

**b**) selection result using the GA (1:50,000), and (

**c**) selection result enlarged to 1:10,000 from 1:50,000.

**Figure 22.**Must-be-selected buildings in selection unit A when the target scale is: (

**a**) 1:25,000, and (

**b**) 1:50,000. The green dashed line is the simplified boundary line.

**Figure 23.**Must-be-selected buildings in selection unit B when the target scale is: (

**a**) 1:25,000, and (

**b**) 1:50,000. The green dashed line is the simplified boundary line.

**Figure 24.**Two alignments of selection unit A in detail. The pictures on the left are building alignments at the source map scale, the pictures in the middle are building alignments at 1:25,000, and the pictures on the right are building alignments at 1:50,000 (outlined shapes: original buildings, fully shaded shapes: selected buildings).

Selection Unit | Scale | Initial Conflicts | Final Conflicts | Estimated Building Number | Resultant Building Number | Execution Time (s) |
---|---|---|---|---|---|---|

A | 1:25,000 | 170 | 0 | 99 | 79 | 66 |

1:50,000 | 642 | 0 | 70 | 37 | 136 | |

B | 1:25,000 | 132 | 0 | 129 | 125 | 108 |

1:50,000 | 637 | 0 | 91 | 53 | 193 |

Selection Unit | Unit A | Unit B | ||
---|---|---|---|---|

Scale | 1:25,000 | 1:50,000 | 1:25,000 | 1:50,000 |

Ratio of changes (%) | 3.38 | 11.24 | 1.85 | 9.99 |

Selection Unit | Unit A | Unit B | ||||
---|---|---|---|---|---|---|

Scale | 1:10,000 | 1:25,000 | 1:50,000 | 1:10,000 | 1:25,000 | 1:50,000 |

Building density | 0.112 | 0.122 | 0.206 | 0.126 | 0.149 | 0.212 |

© 2017 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/).

## Share and Cite

**MDPI and ACS Style**

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.
https://doi.org/10.3390/ijgi6090271

**AMA Style**

Wang L, Guo Q, Liu Y, Sun Y, Wei Z.
Contextual Building Selection Based on a Genetic Algorithm in Map Generalization. *ISPRS International Journal of Geo-Information*. 2017; 6(9):271.
https://doi.org/10.3390/ijgi6090271

**Chicago/Turabian Style**

Wang, Lin, Qingsheng Guo, Yuangang Liu, Yageng Sun, and Zhiwei Wei.
2017. "Contextual Building Selection Based on a Genetic Algorithm in Map Generalization" *ISPRS International Journal of Geo-Information* 6, no. 9: 271.
https://doi.org/10.3390/ijgi6090271