Implementation and Evaluation of a Fast Area Feature Labeling Method Using Auxiliary Lines †
Abstract
:1. Introduction
- Capability of real-time processing on tablet devices, i.e., all label positions of the area features in the display frame should be defined within 100 ms.
- Effective label placement (in both wholly and partially displayed areas), preferably near the centroid of a large convex polygon in the area.
- (a)
- The fixed-position model, which places each point feature label, such that one fixed point on its boundary touches the corresponding point feature.
- (b)
- The slider model, which allows continuous sliding of the label in one or more directions under one constraint: the label boundary must touch the corresponding point feature.
2. Proposed Method
2.1. A Simple and Fast Method
2.2. Proposed Label Placement Method
- Distance between the midpoint of and the right-most intersection of .
- Distance between the midpoint of and the left-most intersection of .
- Distance between the midpoint of and the bottom-most intersection of .
- Distance between the midpoint of and the top-most intersection of .
2.3. Preprocessing Steps
2.4. Algorithm Description
- (1)
- Execute the following preprocessing steps.
- (1-a)
- Store the left-, right-, top-, and bottom-most endpoints of the boundary lines of A.
- (1-b)
- Store the boundary lines of A in order of horizontal and vertical coordinates of their midpoints.
- (1-c)
- For each boundary line of A, store all boundary lines of A having partial commonality with in the horizontal and vertical directions.
- (2)
- For each auxiliary line, execute the following steps.
- (2-a)
- Obtain one intersection of the auxiliary line and the boundary lines of A by binary search.
- (2-b)
- Detect all intersections by considering only the boundary lines stored in step (1-c).
- (2-c)
- Create a label candidate.
- (3)
- Select the label candidate with maximum flexibility as the final label position.
3. Computational Experiments
3.1. Experimental Conditions
- (A)
- The label height was set to 5% of the height of the corresponding area. The label width was set to the height times , where is the number of letters in the label.
- (B)
- The label height was set to 10% of the height of the corresponding area. The label width was set to the height times .
3.2. Evaluation
- (i)
- the connected endpoints exist inside area and
- (ii)
- the connected endpoints form a convex polygon.
3.3. Experimental Results
4. Extending the Proposed Method
4.1. Label Placement in a Partial Area
- (i)
- Do the boundary lines of A intersect the display frame?
- (ii)
- Does an arbitrary point p within A lie inside the display frame?
4.2. Label Placement of Area Features with Inclusion Relations
5. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Okamoto, S.; Sakaguchi, R.; (Dawn Corporation, Kobe, Japan). Personal communication, 2015.
- Hirsch, S.A. An algorithm for automatic name placement around point data. Am. Cartogr. 1982, 9, 5–17. [Google Scholar] [CrossRef]
- Christensen, J.; Marks, J.; Shieber, S. An empirical study of algorithms for point-feature label placement. ACM Trans. Graph. 1995, 14, 203–232. [Google Scholar] [CrossRef] [Green Version]
- Van Kreveld, M.; Strijk, T.; Wolff, A. Point labeling with sliding labels. Comput. Geom. Theory Appl. 1999, 13, 21–47. [Google Scholar] [CrossRef] [Green Version]
- Funakawa, K.; Abe, N.; Yamaguchi, K.; Masuda, S. Algorithms for the map labeling problem with priorities. IEICE Trans. Fund. Electron. Commun. Comput. Sci. 2005, J88-A, 677–681. (In Japanese) [Google Scholar]
- Bekos, M.A.; Kaufmann, M.; Symvonics, A.; Wolff, A. Boundary labeling: Models and efficient algorithms for rectangular maps. Comput. Geom. Theory Appl. 2007, 36, 215–236. [Google Scholar] [CrossRef] [Green Version]
- Alvim, A.C.F.; Taillard, É.D. POPMUSIC for the point feature label placement problem. Eur. J. Oper. Res. 2009, 192, 396–413. [Google Scholar] [CrossRef]
- Li, L.; Zhang, H.; Zhu, H.; Kuai, X.; Hu, W. A Labeling Model Based on the Region of Movability for Point-Feature Label Placement. ISPRS Int. J. Geo-Inf. 2016, 5, 159. [Google Scholar] [CrossRef] [Green Version]
- Haunert, J.-H.; Wolff, A. Beyond Maximum Independent Set: An Extended Integer Programming Formulation for Point Labeling. ISPRS Int. J. Geo-Inf. 2017, 6, 342. [Google Scholar] [CrossRef] [Green Version]
- Marín, A.; Pelegrín, M. Towards unambiguous map labeling - Integer programming approach and heuristic algorithm. Expert Syst. Appl. 2018, 98, 221–241. [Google Scholar] [CrossRef]
- Wolff, A. The Map-Labeling Bibliography. Available online: https://i11www.iti.kit.edu/map-labeling/bibliography/ (accessed on 26 August 2020).
- Roy, S.; Bhattacharjee, S.; Das, S.; Nandy, S.C. A fast algorithm for point labeling problem. In Proceedings of the 17th Canadian Conference on Computational Geometry, Windsor, ON, Canada, 10–12 August 2005; pp. 155–158. [Google Scholar]
- Yamamoto, M.; Camara, G.; Lorena, L. Fast point-feature label placement algorithm for real time screen maps. In Proceedings of the 7th Brazilian Symposium on GeoInformatics, Campos do Jordão, Brazil, 20–23 November 2005; pp. 1–13. [Google Scholar]
- Mote, K. Fast point-feature label placement for dynamic visualizations. Inf. Vis. 2007, 6, 249–260. [Google Scholar] [CrossRef]
- Kameda, T.; Imai, K. Map label placement for points and curves. IEICE Trans. Fund. Electron. Commun. Comput. Sci. 2003, E86-A, 835–840. [Google Scholar]
- Zhang, Q.; Harrie, L. Real-time map labelling for mobile applications. Comput. Emviron. Urban Syst. 2006, 30, 773–783. [Google Scholar] [CrossRef]
- Zhang, Q.; Harrie, L. Placing text and icon labels simultaneously. Cartogr. Geogr. Inf. Sci. 2006, 33, 53–64. [Google Scholar] [CrossRef]
- 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. [Google Scholar] [CrossRef] [Green Version]
- Kakoulis, K.G.; Tollis, I.G. A unified approach to labeling graphical features. In Proceedings of the 14th Annual Symposium on Computational Geometry, Minneapolis, MH, USA, 7–10 June 1998; pp. 347–356. [Google Scholar]
- Wagner, F.; Wolff, A.; Kapoor, V.; Strijk, T. Three rules suffice for good label placement. Algorithmica 2001, 30, 334–349. [Google Scholar] [CrossRef] [Green Version]
- Rylov, M.; Reimer, A. A practical algorithm for the external annotation of area features. Cartogr. J. 2017, 54, 61–76. [Google Scholar] [CrossRef]
- Aonuma, H.; Imai, H.; Tokuyama, T. Some Voronoi diagrams for character placing problems in map databases. IPSJ SIG Tech. Rep. 1989, 89-AL-10-5, 1–7. (In Japanese) [Google Scholar]
- Barrault, M. A methodology for placement and evaluation of area map labels. Comput. Emviron. Urban Syst. 2001, 25, 33–52. [Google Scholar] [CrossRef]
- Dörschlag, D.; Petzold, I.; Plümer, L. Placing objects automatically in areas of maps. In Proceedings of the 21st International Cartographic Conference, Durban, South Africa, 10–16 August 2003; pp. 269–275. [Google Scholar]
- Edmondson, S.; Christensen, J.; Marks, J.; Shieber, S. A general cartographic labeling algorithm. Cartographica 1996, 33, 13–23. [Google Scholar] [CrossRef] [Green Version]
- Van Roessel, W. An algorithm for locating candidate labeling boxes within a polygon. Am. Cartogr. 1989, 16, 201–209. [Google Scholar] [CrossRef]
- Pinto, I.; Freeman, H. The feedback approach to cartographic areal text placement. In Advances in Structural and Syntactical Pattern Recognition; Springer: New York, NY, USA, 1996; pp. 341–350. [Google Scholar]
- Fundamental Geospatial Data by the Geospatial Information Authority of Japan. Available online: https://www.gsi.go.jp/kiban/ (accessed on 26 August 2020).
- GIS Open Educational Resources. Available online: https://gis-oer.github.io/gitbook/book/index.html (accessed on 26 August 2020).
Label | Number of Boundary Lines | [%] | [%] | Run Time [ms] |
---|---|---|---|---|
Aisai-shi | 2255 | 100.0 | 0.50 | 0.0085 |
Ajigasawa-cho | 6568 | 100.0 | 9.91 | 0.0070 |
Ashoro-cho | 12,849 | 100.0 | 8.99 | 0.0096 |
Iida-shi | 10,051 | 100.0 | 2.76 | 0.0071 |
Ishikari-shi | 10,304 | 98.6 | 1.85 | 0.0083 |
Iyo-shi | 4760 | 100.0 | 4.52 | 0.0079 |
Esashi-cho | 4902 | 100.0 | 2.91 | 0.0088 |
Ozu-shi | 6593 | 100.0 | 9.56 | 0.0077 |
Otsu-shi | 4627 | 63.2 | 1.84 | 0.0078 |
Onojo-shi | 1799 | 100.0 | 3.43 | 0.0074 |
Onagawa-cho | 18,416 | 100.0 | 0.73 | 0.0145 |
Kagoshima-shi | 11,577 | 92.6 | 4.51 | 0.0127 |
Kasaoka-shi | 4379 | 60.8 | 15.29 | 0.0100 |
Katsuragi-cho | 3703 | 86.4 | 5.77 | 0.0071 |
Kushiro-shi | 15,200 | 100.0 | 5.36 | 0.0081 |
average | 6470.8 | 93.4 | 5.20 | 0.0088 |
Label | Number of Boundary Lines | [%] | [%] | Run Time [ms] |
---|---|---|---|---|
Aisai-shi | 2255 | 100.0 | 0.63 | 0.0083 |
Ajigasawa-cho | 6568 | 100.0 | 0.22 | 0.0069 |
Ashoro-cho | 12,849 | 100.0 | 11.26 | 0.0094 |
Iida-shi | 10,051 | 100.0 | 2.66 | 0.0071 |
Ishikari-shi | 10,304 | 100.0 | 4.80 | 0.0079 |
Iyo-shi | 4760 | 100.0 | 4.26 | 0.0075 |
Esashi-cho | 4902 | 100.0 | 1.33 | 0.0068 |
Ozu-shi | 6593 | 100.0 | 11.12 | 0.0078 |
Otsu-shi | 4627 | 48.2 | 2.46 | 0.0078 |
Onojo-shi | 1799 | 100.0 | 0.59 | 0.0076 |
Onagawa-cho | 18,416 | 100.0 | 9.27 | 0.0149 |
Kagoshima-shi | 11,577 | 100.0 | 13.31 | 0.0126 |
Kasaoka-shi | 4379 | 73.8 | 8.20 | 0.0098 |
Katsuragi-cho | 3703 | 100.0 | 4.01 | 0.0072 |
Kushiro-shi | 15,200 | 100.0 | 6.01 | 0.0083 |
average | 6470.8 | 94.8 | 5.34 | 0.0087 |
© 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/).
Share and Cite
Abe, N.; Kuroda, K.; Kamata, Y.; Midoritani, S. Implementation and Evaluation of a Fast Area Feature Labeling Method Using Auxiliary Lines. ISPRS Int. J. Geo-Inf. 2020, 9, 529. https://doi.org/10.3390/ijgi9090529
Abe N, Kuroda K, Kamata Y, Midoritani S. Implementation and Evaluation of a Fast Area Feature Labeling Method Using Auxiliary Lines. ISPRS International Journal of Geo-Information. 2020; 9(9):529. https://doi.org/10.3390/ijgi9090529
Chicago/Turabian StyleAbe, Noboru, Kohei Kuroda, Yosuke Kamata, and Shogo Midoritani. 2020. "Implementation and Evaluation of a Fast Area Feature Labeling Method Using Auxiliary Lines" ISPRS International Journal of Geo-Information 9, no. 9: 529. https://doi.org/10.3390/ijgi9090529
APA StyleAbe, N., Kuroda, K., Kamata, Y., & Midoritani, S. (2020). Implementation and Evaluation of a Fast Area Feature Labeling Method Using Auxiliary Lines. ISPRS International Journal of Geo-Information, 9(9), 529. https://doi.org/10.3390/ijgi9090529