# Base Point Split Algorithm for Generating Polygon Skeleton Lines on the Example of Lakes

^{*}

## Abstract

**:**

## 1. Introduction

- Chordal axis transform [4];

## 2. Methods and Materials

#### 2.1. The First Research Task—Characterization of the Bpsplit Algorithm

#### 2.1.1. Method of Selecting TIN Edges which Touch Two Different Boundary Segments in the BPSplit Algorithm

#### 2.1.2. Generation of a Skeleton Based on Segments of a Complex Polygon, Base Points and Midpoints of the Selected TIN Edges

#### 2.1.3. A Comparison of BPSplit and Splitarea Algorithms

#### 2.1.4. Skeleton Adjustment with the BPSplit Algorithm

#### 2.1.5. Summary of the BPSplit Algorithm

#### 2.2. Methodology Associated with the Second Research Task—Polygons with Holes

- To automate the process, each hole boundary (island boundary) can be assigned an ID corresponding to the nearest segment of the external polygon boundary (based on hole centroids). TIN edges between holes and the external boundary lines will be disregarded in the process of selecting TIN edges. The edges of the modified polygon will be located between holes, on the polygon’s centerline (Figure 13a).
- The ID of a selected segment of the external polygon boundary can be assigned to the boundary lines of the selected holes (islands). TIN edges between the selected holes are not considered. TIN edges between the selected holes and the selected segments of the external boundary are not considered either (Figure 13c).

## 3. Validation of the Algorithm on Large Data Sets

#### 3.1. The Application of the BPSplit Algorithm to Different Sets of Base Points in a Selected Object

- A set of base points representing river inflows and outflows in lakes was created.
- The set of base points was used to divide the boundaries of complex polygons.
- TIN edges were generated inside complex polygons based on polygon vertices and base points.
- TIN edges that touch different segments of complex polygon boundaries, but do not touch base points, were selected.
- The midpoints of the selected TIN edges were generated.
- Complex polygons were divided into segments.
- Skeleton edges were generated between the midpoints of the selected TIN edges, and between the midpoints of TIN edges and base points.

#### 3.1.1. Generation of a Skeleton of a Hydrographic Network Based on Lakes and One River

#### 3.1.2. Generation of a Skeleton of a Hydrographic Network Based on Lakes, One River and Three Streams

#### 3.1.3. Generation of a Skeleton for Navigation in the Largest Lake with a Diverse Shore Line

#### 3.2. The Results Generated by the BPSplit Algorithm on a Lake with Numerous Islands

#### 3.3. Modification of a Skeleton Representing a Polygon with Many Holes—Validation of the Solution Proposed in the Second Research Task

#### 3.3.1. Modification of the Base Skeleton to Generate a Skeleton between Islands in the Center of the Lake by Assigning the ID of the Nearest Segment of the Polygon Boundary to Island Boundaries

#### 3.3.2. Modification of the Lake Skeleton to Obtain a Skeleton that Is Not Located between Islands When Island Boundaries Are Assigned an Identical ID

#### 3.3.3. Skeleton Generalization (Smoothing)—Validation of the Third Research Task

## 4. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Lee, D.T. Medial Axis Transformation of a Planar Shape. IEEE Trans. Pattern Anal. Mach. Intell.
**1982**, 4, 363–369. [Google Scholar] [CrossRef] [PubMed] - Chin, F.; Snoeyink, J.; Wang, C.A. Finding the Medial Axis of a Simple Polygon in Linear Time. In International Symposium on Algorithms and Computation; Springer: Berlin/Heidelberg, Germany, 1995. [Google Scholar]
- Karimipour, F.; Ghandehari, M.; LeDoux, H. Watershed delineation from the medial axis of river networks. Comput. Geosci.
**2013**, 59, 132–147. [Google Scholar] [CrossRef] - Prasad, L. Morphological Analysis of Shapes. CNLS Newsl.
**1997**, 139, 1–18. Available online: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.57.3204 (accessed on 12 November 2020). - Eppstein, D.; Erickson, J. Raising Roofs, Crashing Cycles, and Playing Pool: Applications of a Data Structure for Finding Pairwise Interactions. Discret. Comput. Geom.
**1999**, 22, 569–592. [Google Scholar] [CrossRef] [Green Version] - Gold, C. Spatial modeling: Voronoi diagrams. In International Encyclopedia of Geography: People, the Earth, Environment and Technology; Richardson, D., Castree, N., Goodchild, M.F., Kobayashi, A., Liu, W., Marston, R.A., Eds.; Wiley: Hoboken, NJ, USA, 2017. [Google Scholar]
- Li, C.; Yin, Y.; Wu, P.; Wu, W. Pattern recognition and correction method for skeleton lines at small patch boundaries. Trans. GIS
**2020**. [Google Scholar] [CrossRef] - Li, C.; Dai, Z.; Yin, Y.; Wu, P. A method for the extraction of partition lines from long and narrow patches that account for structural features. Trans. GIS
**2019**, 23, 349–364. [Google Scholar] [CrossRef] - Ai, T.; Ke, S.; Yang, M.; Li, J. Envelope generation and simplification of polylines using Delaunay triangulation. Int. J. Geogr. Inf. Sci.
**2016**, 31, 297–319. [Google Scholar] [CrossRef] - Meijers, M.; Savino, S.; Van Oosterom, P. SPLITAREA: An algorithm for weighted splitting of faces in the context of a planar partition. Int. J. Geogr. Inf. Sci.
**2016**, 30, 1522–1551. [Google Scholar] [CrossRef] [Green Version] - Meijers, M. Variable-Scale Geo-Information; Nederlandse Commissie voor Geodesie, Netherlands Geodetic Commission: Delft, The Netherland, 2011; p. 236. [Google Scholar]
- Aigner, W.; Aurenhammer, F.; Jüttler, B. On triangulation axes of polygons. Inf. Process. Lett.
**2015**, 115, 45–51. [Google Scholar] [CrossRef] - Wang, Z.; Yan, H. An algorithm for extracting main skeleton lines of polygons based on main extension directions. In Proceedings of the 2011 International Conference on Electronics, Communications and Control (ICECC), Ningbo, China, 9–11 September 2011; pp. 125–127. [Google Scholar] [CrossRef]
- Lewandowicz, E.; Flisek, P. A Method for Generating the Centerline of an Elongated Polygon on the Example of a Watercourse. ISPRS Int. J. Geo-Inf.
**2020**, 9, 304. [Google Scholar] [CrossRef] - Li, C.; Yin, Y.; Wu, P.; Liu, X.; Guo, P. Improved Jitter Elimination and Topology Correction Method for the Split Line of Narrow and Long Patches. ISPRS Int. J. Geo-Inf.
**2018**, 7, 402. [Google Scholar] [CrossRef] [Green Version] - Wang, T. Extraction of optimal skeleton of polygon based on hierarchical analysis. Int. Arch. Photogramm. Remote Sens. Spat. Inf. Sci.
**2009**, 28, 272–276. [Google Scholar] - Giesen, J.; Miklos, B.; Pauly, M. Medial axis approximation of planar shapes from union of balls: A simpler and more robust algorithm. In Proceedings of the Canadian Conference Computational Geometry, Ottawa, ON, Ontario, 20–22 August 2007; pp. 105–108. [Google Scholar]
- Giesen, J.; Miklos, B.; Pauly, M.; Wormser, C. The scale axis transform. In Proceedings of the 25th Annual Symposium on Computational Geometry, Aarhus, Denmark, 8–10 June 2009; pp. 106–115. [Google Scholar] [CrossRef]
- Haunert, J.H.; Sester, M. Using the straight skeleton for generalization in a multiple representation environment. In Proceedings of the ICA Workshop on Generalization and Multiple Representation, Leicester, UK, 20–21 August 2004. [Google Scholar]
- Szombara, S. Comparison of methods used in cartography for the skeletonisation of areal objects. Geoinf. Pol.
**2015**, 14, 85–94. [Google Scholar] - ESRI 2020, ArcGIS. Available online: https://www.esri.pl/ (accessed on 12 November 2020).
- ESRI. Tool: Creates Centerlines from Polygon Features. 2020. Available online: https://pro.arcgis.com/en/pro-app/tool-reference/topographic-production/polygon-to-centerline.htm (accessed on 12 November 2020).
- Douglas, D.H.; Peucker, T.K. Algorithms for the reduction of the number of points required to represent a digitized line or its caricature. Cartogr. Int. J. Geogr. Inf. Geovis.
**1973**, 10, 112–122. [Google Scholar] [CrossRef] [Green Version] - Li, Z.L.; Openshaw, S. Algorithms for automated line generalization based on a natural principle of objective generalization. Int. J. Geogr. Inf. Syst.
**1992**, 6, 373–389. [Google Scholar] [CrossRef] - Qian, H.; Zhang, M.; Wu, F. A New Simplification Approach Based on the Oblique-Dividing-Curve Method for Contour Lines. ISPRS Int. J. Geo-Inf.
**2016**, 5, 153. [Google Scholar] [CrossRef] [Green Version] - Shi, W.; Cheung, C. Performance Evaluation of Line Simplification Algorithms for Vector Generalization. Cartogr. J.
**2006**, 43, 27–44. [Google Scholar] [CrossRef] - Kozioł, K. Znaczenie punktów stałych obiektu w procesie upraszczania (The importance of fixed points in the simplification proces). Archiwum Fotogrametrii, Kartografii i Teledetekcji
**2012**, 23, 169–177. [Google Scholar]

**Figure 1.**Triangle types: type 1—link triangle, type 2—ear triangle, types 3 and 4—branch triangles.

**Figure 3.**Topological relations during data processing: (

**a**) attribute table of triangulated irregular network (TIN) edges; (

**b**) attribute table of TIN edge vertices with Vertex ID (Point_ID) and TIN_ID values; (

**c**) attribute table of TIN edge vertices that touch boundary segments (containing the values of BoundarySegment_ID).

**Figure 4.**Selection of TIN edges (TIN_ID) based o: (

**a**) attributes of TIN vertices based on the topological relations during data processing; (

**b**) ID of TIN edges selected based on FALSE values (370, 371, 372, 374, etc.).

**Figure 6.**Elimination of loops from a skeleton: (

**a**) skeleton with a loop; (

**b**) the loop is replaced with the loop centroid (type 3 triangle); (

**c**) the skeleton is modified with the use of network analysis tools; (

**d**) the resulting skeleton where the loop was replaced with the loop centroid.

**Figure 8.**Editing of skeleton edges based on various types of polygon segments: (

**a**) different types of polygon segments with skeleton edges; (

**b**) different locations of base points in segments with a visualization of skeleton edges.

**Figure 9.**Complex polygons with holes: (

**a1**,

**a2**) are based on the work of Meijers et al. [10]; (

**b1**,

**b2**) represent complex polygons with one hole and numerous holes for testing.

**Figure 10.**Skeletons generated by the BPSplit algorithm based on the spatial data presented in Figure 9: (

**a**) skeleton of a polygon with a single hole; (

**b**) skeleton of a polygon with four holes.

**Figure 11.**Flowchart of the algorithm which modifies a polygon skeleton by changing island identifiers.

**Figure 12.**Skeletons generated for a polygon with a hole: (

**a**) skeleton generated based on source data; (

**b**) skeleton modified on the assumption that the skeleton should not be located south of the hole (the island ID was modified by changing the color of the island boundary).

**Figure 13.**Skeleton modification based on three criteria: (

**a**) the skeleton should be located in the center of the complex polygon between holes (islands); (

**b**) the skeleton should omit holes (islands) and should be located along the external boundary of the complex polygon; (

**c**) the skeleton can also be modified by changing the ID of hole boundaries.

**Figure 15.**The analyzed object—four lakes connected by a river with seasonal streams flowing into the lakes.

**Figure 16.**Source data for generating the first skeleton based on 8 base points and 9 segments of polygon (lake) boundaries: (

**a**) lakes with the location of base points; (

**b**) segmentation of the boundary lines of lakes; (

**c**) two small lakes with segments of their boundary lines.

**Figure 17.**Skeleton of a hydrographic network generated with the BPSplit algorithm based on the selected base points: (

**a**) TIN edges in polygons (lakes); (

**b**) the selected TIN edges; (

**c**) two small lakes with the selected TIN edges.

**Figure 18.**Examples of different polygon segments for generating a skeleton based on the midpoints of the selected TIN edges. A few segments have the shape of type 1 and 3 triangles from Figure 8.

**Figure 19.**Skeleton of the hydrographic network generated based on 11 base points in four lakes, one river intersecting all lakes, and three seasonal streams flowing into the analyzed lakes: (

**a**) generation process; (

**b**) results.

**Figure 21.**Skeleton of a polygon generated based on 7 base points marking attractive sites on the lake shore. The skeleton can be used for navigation; (

**a**) generation process; (

**b**) results.

**Figure 23.**Data transformation in the skeleton generation process: (

**a**) location of base points, (

**b**) vertices of a complex polygon representing the analyzed lake; (

**c**) generated TIN edges; (

**d**) TIN edges inside the complex polygon representing the analyzed lake, with a visualization of boundary segments; (

**e**) process visualization, with an indication of the TIN edges selected for skeleton generation.

**Figure 24.**Skeleton of a lake with numerous islands developed with the BPSplit algorithm based on the adopted set of base points.

**Figure 25.**Modification of the base skeleton to obtain a skeleton in the center of the polygon between islands: (

**a**) island boundaries are assigned new identifiers, and the resulting changes are marked in color; (

**b**) a subset of TIN edges for modifying the skeleton is marked in white; (

**c**) elimination of skeleton edges that touch TIN edges; (

**d**) the resulting skeleton.

**Figure 26.**Modification of the base skeleton to obtain a skeleton located along the lake’s external boundaries when the boundaries of all islands are assigned an identical ID: (

**a**) the segments of island boundaries are assigned new identifiers, and the island boundary lines are marked with the same color; (

**b**) the subset of TIN edges for modifying the skeleton is marked in white; (

**c**) elimination of skeleton edges that touch the subset of TIN edges; (

**d**) the resulting skeleton.

**Figure 27.**Skeleton model: (

**a**) model with loops; (

**b**) model where loops were replaced with loop centroids; (

**c**,

**d**) fragments of the skeleton before and after loop removal.

**Figure 28.**Elimination of zigzag effects in the network skeleton by establishing fixed points at network nodes: (

**a**) zigzag effects in the network; (

**b**) visualization of the smoothing method; (

**c**) results of smoothing after the first iteration; (

**d**) results of smoothing after the second iteration.

**Figure 29.**A model of the network skeleton generated in a geometrically complex polygon representing Lake Wydmińskie based on the adopted set of base points, after loop elimination and two iterations of the smoothing procedure to remove zigzag effects.

**Table 1.**Process of generating a skeleton with the Splitarea algorithm and the Base Point Split algorithm.

Classical Algorithm: Splitarea [10] | Proposed Algorithm: BPSplit | |
---|---|---|

(1) | Triangulation | Segmentation of polygon boundaries with the use of base points |

(2) | Selection of internal triangles | Triangulation |

(3) | Skeleton generation | Selection of internal triangles |

(4) | Generation of connectors | Selection of TIN edges based on segments of the polygon boundary |

(5) | Edge labeling and skeleton pruning | Generation of the final skeleton |

(6) | Generation of the final skeleton | Skeleton smoothing |

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

## Share and Cite

**MDPI and ACS Style**

Lewandowicz, E.; Flisek, P.
Base Point Split Algorithm for Generating Polygon Skeleton Lines on the Example of Lakes. *ISPRS Int. J. Geo-Inf.* **2020**, *9*, 680.
https://doi.org/10.3390/ijgi9110680

**AMA Style**

Lewandowicz E, Flisek P.
Base Point Split Algorithm for Generating Polygon Skeleton Lines on the Example of Lakes. *ISPRS International Journal of Geo-Information*. 2020; 9(11):680.
https://doi.org/10.3390/ijgi9110680

**Chicago/Turabian Style**

Lewandowicz, Elżbieta, and Paweł Flisek.
2020. "Base Point Split Algorithm for Generating Polygon Skeleton Lines on the Example of Lakes" *ISPRS International Journal of Geo-Information* 9, no. 11: 680.
https://doi.org/10.3390/ijgi9110680