Quick viewing(Text Mode)

A Method for Generating the Centerline of an Elongated Polygon on the Example of a Watercourse

A Method for Generating the Centerline of an Elongated Polygon on the Example of a Watercourse

International Journal of Geo-Information

Article A Method for Generating the Centerline of an Elongated Polygon on the Example of a Watercourse

El˙zbietaLewandowicz * and Paweł Flisek Department of Geoinformation and Cartography, Institute of Geodesy and Civil Engineering, Faculty of Geoengineering, University of Warmia and Mazury in Olsztyn, 10-719 Olsztyn, Poland; pawel.fl[email protected] * Correspondence: [email protected]

 Received: 23 March 2020; Accepted: 4 May 2020; Published: 7 May 2020 

Abstract: The centerlines of polygons can be generated with the use of various methods. The aim of this study was to propose an algorithm for generating the centerline of an elongated polygon based on the transformation of vector data. The proposed method involves the determination of base points denoting the direction of flow. These points were also used to map two polygon boundaries. A Triangulated Irregular Network (TIN) was created based on the polygon’s breakpoints. Edges that intersect the river in a direction perpendicular to river flow (across) were selected from a set of TIN edges. The polygon was partitioned into segments with the use of the selected TIN edges. The midpoints of selected TIN edges were used to generate the polygon’s centerline based on topological relations. The presented methodology was tested on a polygon representing a 15-km-long section of a river intersecting the city of Olsztyn (a university center). The analyzed river is a highly meandering watercourse, and its channel is narrowed down by hydraulic structures. The river features an and channels. The generated centerline effectively fits the polygon, and, unlike the solution modeled with the Medial Axis Transformation (MAT) algorithm, it does not feature branching .

Keywords: geoinformation algorithms; centerline of a polygon; centerline of a river; watercourse modeling

1. Introduction Inland bodies of water are represented by raster or vector data in Geographic Information System (GIS) applications. Raster data are acquired from satellite images. Datasets describing inland water bodies are generated by extracting (detecting, classifying) the information contained in images [1,2]. Vector data representing water bodies are obtained by converting classified images [3,4] or by manual vectorization of data. Watercourses are modeled based on the data describing bodies of water. When raster data are used, the centerlines of watercourses are modeled with dedicated algorithms [5]. These tools are applied in Digital Terrain Models (DTMs), and they increase modeling accuracy by automatically generating maximum gradient lines [6]. Numerous algorithms for generating polygon centerlines based on raster data have been presented in the literature [7–10]. These solutions are based on the parallel thinning algorithm or its modified versions [11–13].

1.1. Generation of a Polygon Skeleton Based On Vector Data In large-scale maps, data from classified images are converted to vector format. After data conversion, smaller can be represented by lines, whereas larger rivers are represented by polygons. The resulting data are used to model watercourses. The centerlines of the modeled

ISPRS Int. J. Geo-Inf. 2020, 9, 304; doi:10.3390/ijgi9050304 www.mdpi.com/journal/ijgi ISPRSISPRS Int.Int. J. Geo-Inf. 2020, 9, 304x FOR PEER REVIEW 2 of 2021 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 2 of 21 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 2 of 21 watercourseswatercourses areare extrapolatedextrapolated withwith manual, semi-automaticsemi-automatic oror automaticautomatic methods methods in inGIS GIS watercourses are extrapolated with manual, semi-automatic or automatic methods in GIS applications. applications.applications.watercourses The Theare ESRI ESRIextrapolated and and GRASSGRASS with applications manual, semi-automatic[[14]14] forfor generatinggenerating or polygon automaticpolygon centerlines centerlinesmethods involved ininvolved GIS The ESRI and GRASS applications [14] for generating polygon centerlines involved semi-automatic semi-automaticsemi-automaticapplications. The editingediting ESRI andoptionsoptions GRASS withwith applications tools forfor [mapping14]mapping for generating midpoints.midpoints. polygon River River centerlinescenterlines centerlines involved can can be be editing options with tools for mapping midpoints. River centerlines can be generated automatically in generatedgeneratedsemi-automatic automatically automatically editing in inoptions ESRI ESRI softwaresoftware with tools [14] bybyfor the themapping “Polygon “Polygon midpoints. to to centerline” centerline” River tool. tool. centerlines can be ESRI software [14] by the “Polygon to centerline” tool. generatedTheThe solutions solutions automatically forfor generatinggenerating in ESRI software thethe centerlines [14] by the of“Polygonof watercourseswatercourses to centerline” have have been tool.been described described in inthe the literatureliteratureTheThe solutions[2,9]. [2,9].solutions Four Four forbasic forbasic generatinggenerating methods methods areare thethe used centerlinescenterlines forfor thisthis purpose:of ofpurpose: watercourses watercourses Voronoi Voronoi havediagrams havediagrams been been (VDs), described(VDs), described the the Straight in Straight inthe the literatureSkeletonSkeletonliterature algorithm, [ 2algorithm, ,[2,9].9]. Four Four the basic the basic Medial Medial methods methods AxisAxisare are Transformati usedused forfor thisonon purpose:(MAT)(MAT) algorithm, algorithm, Voronoi Voronoi diagramsand diagramsand triangulation triangulation (VDs), (VDs), the (Figure the (FigureStraight Straight 1). 1). SkeletonTheseTheseSkeleton methods methods algorithm, algorithm, have have the beenthe been Medial Medial presented presented AxisAxis and TransformationTransformati comparedon inin (MAT) (MAT)the the literature literature algorithm, algorithm, [15,16]. [15,16]. and and triangulation triangulation (Figure (Figure 1).1 ). TheseThese methods methods have have been been presented presented and and comparedcompared in the literature [15,16]. [15,16].

Figure 1. A skeleton (red lines) of the created object: (a) based on Voronoi diagram (VD) edges; (b) Figure 1. A skeleton (red lines) of the created object: (a) based on Voronoi diagram (VD) edges; (b) FigurewithFigure the 1. 1. Ause A skeleton skeletonof the Straight (red lines) lines) Skeleton of of the themethod; created created ( cobject:) with object: (thea) (basedMediala) based on Axis Voronoi on (Transform) Voronoi diagram diagram method; (VD) edges; (VD) (d) with edges;(b) (withb)constrainedwith with the the use the use of useDelaunay of the the of Straight theStraight triangulation Straight Skeleton Skeleton Skeleton [16]. method;method; method; (c)) withwith ( c thethe) with Medial Medial the Axis MedialAxis (Transform) (Transform) Axis (Transform) method; method; (d ) method;( dwith) with (constrainedd)constrained with constrained Delaunay Delaunay Delaunay triangulation triangulation triangulation [16].[16]. [16]. In the first solution, a polygon is partitioned into segments [9,17] with the use of tools for generatingInIn thethe the firstfirst Voronoifirst solution,solution, solution, diagrams aa polygonpolygonpolygon (VDs) (Figure isis partitionedpartitionedpartitioned 2). into into segments segments [9,17] [9,17] [9,17 ]with with the the use use of oftools tools for for generatinggenerating Voronoi Voronoi diagramsdiag diagramsrams (VDs)(VDs) (VDs) (Figure (Figure(Figure2 ).2).

(a) (b) (a) (b) (a) (b)

FigureFigure 2. 2.Process Process of generatingof generating the the centerline centerline of aof river a river by by partitioning partitioning a polygon a polygon into into segments segments with VDs.withFigure (a VDs.) this2. (a study;Process) this study; ( bof) visualizationgenerating (b) visualization the realized centerline realized by Gollyof by a Gollyriver and by Turowskiand partitio Turowski [ning9]. [9]. a polygon into segments Figure 2. Process of generating the centerline of a river by partitioning a polygon into segments with VDs. (a) this study; (b) visualization realized by Golly and Turowski [9]. ThiswithThis VDs. methodmethod (a) this is study;is deployeddeployed (b) visualization byby variousvarious realized tools tools by Golly in in andprogramming programming Turowski [9]. platforms platforms such such as asET ET SpatialTechniquesSpatialTechniquesThis method [ 18 [18],is], GRASSdeployedGRASS GISGIS by [[19]19 various] andand FME tools [20], [20 ],in as as programmingwell well as as in in Python Python platforms libraries libraries such [21]. [21 as].In IntheET the resultingresultingSpatialTechniquesThis solutions, methodsolutions, the[18],isthe deployedgenerated GRASS GIS centerline centerlineby [19] various and covers coversFME tools all [20], allside in sideas streams programmingwell streams as which in whichPython need platforms needtolibraries be eliminated. to be[21].such eliminated. In as Thethe ET TheSpatialTechniquesgeneratedresulting generated solutions, centerlines centerlines [18], the have generatedGRASS have to be to GISsmoothed becenterline smoothed[19] and and covers FME andaligned all aligned[20], side with as streams withpolygonwell polygon aswhich boundaries.in Python need boundaries. to librariesbe eliminated. [21]. TheIn the resultinggeneratedPolygonPolygon solutions, centerlines centerlines centerlines the havegenerated can can alsoto bealso be smoothedcenterline generatedbe generated and covers with aligned with the all Straight side thewith streamsStraight polygon Skeleton whichSkeleton boundaries. algorithm need algorithm to [ be15, 22eliminated. –[15,22–26],26], which The is basedgeneratedwhich onPolygon is bubasedcenterlinesffer centerlines on lines buffer have (Figure lines canto 3be ).(Figurealso smoothed Similarly be 3). generated Similarly toand other aligned withto solutions,other thewith solutions, Straight polygon the Straight theSkeleton boundaries. Straight Skeleton algorithm Skeleton algorithm [15,22–26],algorithm first generatesfirstwhichPolygon generates is a based skeleton centerlines a on skeleton buffer of a polygon, linescanof a polygon, also(Figure and be 3). thegeneratedand Similarly centerline the centerline withto isother thenthe is solutions, then extractedStraight extracted the Skeleton from Straight from the thealgorithm skeleton.Skeleton skeleton. algorithm [15,22–26], whichfirst generatesis based on a skeletonbuffer lines of a (Figurepolygon, 3). and Similarly the centerline to other is solutions,then extracted the Straightfrom the Skeleton skeleton. algorithm first generates a skeleton of a polygon, and the centerline is then extracted from the skeleton.

(a) (b) (a) (b) Figure 3. Generation of polygon centerlines with the use of the Straight Skeleton algorithm [25]; (a) simple example,(a) ( b ) example at diverse polygon. (b)

ISPRSISPRS Int. Int. J. J. Geo-Inf. Geo-Inf. 2020 2020, 9, ,9 x, xFOR FOR PEER PEER REVIEW REVIEW 3 3of of 21 21 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 3 of 21 Figure 3. Generation of polygon centerlines with the use of the Straight Skeleton algorithm [25]; (a) FigureFigure 3.3. GenerationGeneration ofof polygonpolygon centerlinescenterlines withwith thethe ususee ofof thethe StraightStraight SkeletonSkeleton algorithmalgorithm [25];[25]; (a)(a) ISPRSsimple Int. J. Geo-Inf.example,2020 (b), 9 ,example 304 at diverse polygon. 3 of 20 simplesimple example,example, (b)(b) exampleexample atat diversediverse polygon.polygon. Other solutions are based on the MAT algorithm [27,28]. The centerline of a watercourse OtherOther solutionssolutions areare basedbased onon thethe MATMAT algorithmalgorithm [27,28].[27,28]. TheThe centerlinecenterline ofof aa watercoursewatercourse generatedOther with solutions the areMAT based algorithm on the MAT features algorithm distri [27butary,28]. Thechannels centerline (Figure of a watercourse4) that have generated to be generatedgenerated withwith thethe MATMAT algorithmalgorithm featuresfeatures distridistributarybutary channelschannels (Figure(Figure 4)4) thatthat havehave toto bebe eliminatedwith the MAT [29–33]. algorithm features distributary channels (Figure4) that have to be eliminated [29–33]. eliminatedeliminated [29–33].[29–33].

b) b)b)

Figure 4. Generation of polygon centerlines with the use of the Medial Axis Transformation (MAT) FigureFigure 4.4. GenerationGeneration of of polygon polygon centerlinescenterlines withwith thethe useuse ofof thethe MedialMedial AxisAxis TransformationTransformation (MAT)(MAT) algorithm: (a1) and (a2) the resulting centerline of a watercourse [34], (b) elimination of distributary algorithm:algorithm: (( a1a1)) and and ( (a2a2)) the the resulting resulting centerline centerline of of a a watercourse watercourse [34], [[34],34], ( (bb)) elimination elimination of of distributary distributary channels during the generation of polygon centerlines on the map of Italy [35]. channelschannels during during the the generationgeneration ofof polygonpolygopolygonn centerlinescenterlines onon thethe mapmap ofof ItalyItaly [[35].[35].35]. Delaunay triangulation has been used by many authors to generate polygon skeletons. The DelaunayDelaunay triangulationtriangulation triangulation hashas has beenbeen been usedused used bybyby manymany many authorsauthors authors toto generategenerate to generate polygonpolygon polygon skeletons.skeletons. skeletons. TheThe algorithms based on Delaunay triangulation rely on Triangulated Irregular Network (TIN) Thealgorithmsalgorithms algorithms basedbased based onon onDelaunayDelaunay Delaunay triangulationtriangulation triangulation rerelyly rely onon on TriangulatedTriangulated Triangulated IrregularIrregular Irregular NetworkNetwork Network (TIN) (TIN) polygons, TIN edges and special locations. Three [36,37] (Figure 5 (1)) or even four types of TIN polygons,polygons, TIN TIN edges edges andand specialspecial locations.locations. locations. ThreeThree Three [3[3 [6,37]366,37],37 ](Figure(Figure (Figure 555 (1))(1))(1)) ororor eveneveneven fourfourfour typestypestypes ofofof TIN TINTIN polygons are identified: type 0, type 1, type 2 and type 3 [38] (Figure 5 (2)), and Figure 6 polygonspolygons areare identified:identified:identified: type type 0,0, typetype 1,1, typetype 22 andand typetype 33 [[38][38]38] (Figure(Figure5 55(2)), (2)),(2)), and andand Figure FigureFigure6. 66

(1) (2) (1)(1) (2)(2) Figure 5. Triangle types: (1): (a) ear triangle, (b) link triangle, (c) branch triangle [37]; (2): 0-triangles, FigureFigure 5.5. TriangleTriangle types:types: (1): ((1):1): (( aa)) earear triangle, triangle, ( (bb)) link link triangle, triangle, ( (cc)) branch branch triangle triangle [37]; [[37];37]; (2): ((2):2): 0-triangles,0-triangles, 1-triangles, 2-triangles and 3-triangles [38]. 1-triangles,1-triangles, 2-triangles2-triangles andand 3-triangles3-triangles [[38].[38].38].

FigureFigure 6. 6. DelaunayDelaunay triangle triangle classification classification an andd the the generated generated polygon polygon skeleton skeleton [36]. [36]. FigureFigure 6.6. DelaunayDelaunay triangletriangle classificationclassification anandd thethe generatedgenerated polygonpolygon skeletonskeleton [36].[36]. Polygon skeletons are generated based on topological relations. The relations between special Polygon skeletons are generated based on topological relations. The relations between special points,PolygonPolygon including skeletonsskeletons midpoints areare generatedgenerated of TIN edges, basedbased midpoints onon topolotopolo ofgicalgical TIN relations.relations. polygons TheThe and relationsrelations TIN polygons, betweenbetween are specialspecial taken points, including midpoints of TIN edges, midpoints of TIN polygons and TIN polygons, are taken points,intopoints, consideration includingincluding midpointsmidpoints [36,37]. The ofof polygonTINTIN edges,edges, axis midpoimidpoi is extractedntsnts ofof basedTINTIN polygonspolygons on the generated andand TINTIN skeleton polygons,polygons, [39 areare–41 takentaken] and

the relations between the areas adjacent to the polygons. Various methods are applied for this purpose. ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 4 of 21

into consideration [36,37]. The polygon axis is extracted based on the generated skeleton [39–41] and ISPRSthe Int. relations J. Geo-Inf. between2020, 9, 304 the areas adjacent to the polygons. Various methods are applied for4 ofthis 20 purpose. A splitA split area area algorithm algorithm was was presented presented by by [38 [38]] for for weighted weighted splitting splitting of of faces faces in in the the context context of of a a planarplanar partition partition which which is used is used to generate to generate network network segments segments on polygons on polygo representingns representing water bodies. water bodies. The proposed solution relies on Delaunay triangulation of polygon vortices. The edges of a The proposed solution relies on Delaunay triangulation of polygon vortices. The edges of a Triangulated Triangulated Irregular Network (TIN) form a skeleton. Selected triangles are assigned weights, Irregular Network (TIN) form a skeleton. Selected triangles are assigned weights, which facilitates which facilitates correct generation of the network model (Figure 7) correct generation of the network model (Figure7)

a) b)

FigureFigure 7. The7. The results results of aofsplit a split area area algorithm algorithm for for generating generating a polygona polygon axis axis based based on on three three triangle triangle types:types: (a) a base) base skeleton, skeleton, (b b)) modification modification of of the the finalfinal skeletonskeleton [[38].38].

1.2.1.2. Methods Methods of Generatingof Generating the th Axese Axes of of Elongated Elongated Polygons Polygons DetailedDetailed solutions solutions for for generating generating elongated elongated polygons polygons based based on on points points denoting denoting an an elongated elongated polygonpolygon line line have have been been proposed proposed in in the the literature literature [40 [40–42].–42]. TIN TIN edges edges that that do do not not intersect intersect the the main main directiondirection of theof the anticipated anticipated polygon polygon in in a perpendiculara perpendicular direction direction pose pose a a problem problem in in the the presented presented solutions.solutions. Side Side streams streams are are created created whenwhen TINTIN edgesedges are taken taken into into consideration consideration in in the the process process of of generating a skeleton,skeleton, andand theythey havehave toto bebe eliminatedeliminated inin successive successivesteps. steps. VariousVarious methodsmethods forfor addressingaddressing this this issue issue have have been been proposed proposed in in the the literature. literature. WangWang et al.et [al.40 ][40] used used a backtracking a backtracking algorithm algorithm to generate to generate the mainthe main skeleton skeleton line line by searching by searching for otherfor nodesother innodes an orderly in an manner.orderly manner. This procedure This procedure involves threeinvolves steps. three First, steps. a polygon First, isa generatedpolygon is bygenerated Delaunay triangulation.by Delaunay triangulation. Secondly, the Secondly, start and endthe start points and of end the mainpoints skeleton of the main line skeleton are determined line are baseddetermined on the main based extension on the direction main extension of the polygon. directio Finally,n of the backtrackingpolygon. Fina algorithmlly, the isbacktracking applied to generatealgorithm the mainis applied skeleton to generate line by searching the main forskeleton other nodesline by in searching an orderly for manner. other nodes in an orderly manner.Li et al. [41] proposed a partition line extraction algorithm that accounts for the direction between triangleLi edges et al. and [41] the proposed distance ofa nodespartition in aggregationline extraction zones. algorithm Dangling that arcs accounts in the skeleton for the topologydirection arebetween eliminated triangle by iterative edges and deletion, the distance and theof nodes split in line aggregation is retained. zones. The Dangling proposed arcs method in the aimsskeleton to maintaintopology consistency are eliminated between bythe iterative characteristics deletion, of and the the extracted split line line is structure retained. and The the proposed actual structure method of theaims object, to maintain in particular consistency in complex between branch the charac convergenceteristics zones.of the extracted In the first line step, structure three types and the of aggregationactual structure patterns of the (aggregation object, in particular zones type in A,complex B and branch C) that convergence occur in partition zones. lineIn the extractions first step, forthree LN patches types of of aggregation complex branch patterns convergence (aggregation zones zone weres type described A, B and using C) that Delaunay occur in triangulation. partition line A partitionextractions line for extraction LN patches algorithm of complex that accountsbranch convergence for the direction zones betweenwere described triangle using edges Delaunay and the distancetriangulation. of nodes A in partition aggregation line zonesextraction was algorith then proposed.m that accounts for the direction between triangle edges and the distance of nodes in aggregation zones was then proposed. A solution for extracting the skeleton line based on stroke features was described by [42]. A solution for extracting the skeleton line based on stroke features was described by [42]. In In traditional approaches, the main structure and extension characteristics are difficult to maintain traditional approaches, the main structure and extension characteristics are difficult to maintain when dealing with dense junction areas due to the irregularity and complexity of junctions. when dealing with dense junction areas due to the irregularity and complexity of junctions. Therefore, a skeleton line extraction method was proposed based on stroke features. Therefore, a skeleton line extraction method was proposed based on stroke features. In the algorithm described by [37], TIN edges that do not intersect the polygon’s main direction In the algorithm described by [37], TIN edges that do not intersect the polygon’s main direction are transformed. The algorithm is difficult, but not impossible to compute (Figure8). In this solution, ISPRSare transformed. Int. J. Geo-Inf. 2020 The, 9, algorithmx FOR PEER isREVIEW difficult, but not impossible to compute (Figure 8). In this solution, 5 of 21 edges were carefully flipped in the constrained Delaunay triangulation to produce high-quality axes. edges were carefully flipped in the constrained Delaunay triangulation to produce high-quality axes.

FigureFigure 8. 8.Two Two di differentfferent axes axes generated generated fromfrom aa singlesingle polygon:polygon: ( aa)) an an axis axis containing containing an an unwanted unwanted branch,branch, (b ()b the) the axis axis is is pruned pruned by by flipping flipping in in the the triangulationtriangulation [[37].37].

The described algorithms [37,40–42] for determining the main polygon axes and river axes are highly complex. New and simple solutions for automating the generation of the main river axes based on raster and vector data are thus needed. This is an important consideration because geometric models of watercourses are widely used in the management of water resources. They are also applied in specialist hydrographic research [43] and network analyses. Such solutions will also have numerous applications in cartographic generalization [44,45] and other processes [46].

1.3. Research Objective The aim of this study was to propose a new and simple method for generating the centerlines of elongated polygons. It was assumed that the centerline can be generated based only on the midpoints of selected TIN edges that intersect polygons in a direction perpendicular to river flow (across). The research hypothesis states that the elimination of TIN edges that do not intersect the elongated polygon in a perpendicular direction does not exert a significant influence on the shape of the main polygon axis. Therefore, a simplified algorithm based on selected triangle types can be applied to generate the main polygon axis: (a), (b) or type 1 and type 2 triangles (Figure 5). To verify the research hypothesis, the result produced by the simplified algorithm was compared with the centerline generated by the MAT algorithm in the ESRI application with the ”Polygon to center line” tool [33] and with the centerline generated with the VDs tool. The shape of the resulting axes was compared graphically by overlapping the relevant lines and with the use of statistical data. The proposed method was tested on vector data acquired from the public Database of Topographic Objects in 1:10,000 scale (BDOT_10) [47]. The database contains vectorized digital orthophotomaps. In the study, the river channel was represented by an elongated polygon. The BDOT_10 database features a line representing the polygon axis (river). The line was generated manually with tools for mapping midpoints, and it was compared with the axis that was generated automatically in the adopted method. The Database of Topographic Objects in 1:10,000 scale was developed in 2010, and it sets the following requirements for editing watercourses: • the minimum distance between line midpoints is 2 m, • river width should be determined with an accuracy of 20%. If the accuracy with which two river banks are determined affects the accuracy of river width and the river axis, the same approach can be applied to determine the river axis. The above requirements can be also taken into consideration in other methods for determining the river axis.

2. Materials and Methods The proposed method makes a reference to the approach that had been previously deployed by [48,49] to model a network of corridors in buildings. In the present study, the described approach was used to model a river channel based on geometric data. For the needs of this study, the presented approach was modified to model elongated objects characterized by varied width and narrow segments due to the presence of hydraulic structures in the river channel. Due to variations in river width, a universal approach to selecting midpoints on polygon centerlines was adopted. In this study and in the authors’ previous research, line segments intersecting polygons were generated

ISPRS Int. J. Geo-Inf. 2020, 9, 304 5 of 20

The described algorithms [37,40–42] for determining the main polygon axes and river axes are highly complex. New and simple solutions for automating the generation of the main river axes based on raster and vector data are thus needed. This is an important consideration because geometric models of watercourses are widely used in the management of water resources. They are also applied in specialist hydrographic research [43] and network analyses. Such solutions will also have numerous applications in cartographic generalization [44,45] and other processes [46].

1.3. Research Objective The aim of this study was to propose a new and simple method for generating the centerlines of elongated polygons. It was assumed that the centerline can be generated based only on the midpoints of selected TIN edges that intersect polygons in a direction perpendicular to river flow (across). The research hypothesis states that the elimination of TIN edges that do not intersect the elongated polygon in a perpendicular direction does not exert a significant influence on the shape of the main polygon axis. Therefore, a simplified algorithm based on selected triangle types can be applied to generate the main polygon axis: (a), (b) or type 1 and type 2 triangles (Figure5). To verify the research hypothesis, the result produced by the simplified algorithm was compared with the centerline generated by the MAT algorithm in the ESRI application with the ”Polygon to center line” tool [33] and with the centerline generated with the VDs tool. The shape of the resulting axes was compared graphically by overlapping the relevant lines and with the use of statistical data. The proposed method was tested on vector data acquired from the public Database of Topographic Objects in 1:10,000 scale (BDOT_10) [47]. The database contains vectorized digital orthophotomaps. In the study, the river channel was represented by an elongated polygon. The BDOT_10 database features a line representing the polygon axis (river). The line was generated manually with tools for mapping midpoints, and it was compared with the axis that was generated automatically in the adopted method. The Database of Topographic Objects in 1:10,000 scale was developed in 2010, and it sets the following requirements for editing watercourses:

the minimum distance between line midpoints is 2 m, • river width should be determined with an accuracy of 20%. • If the accuracy with which two river banks are determined affects the accuracy of river width and the river axis, the same approach can be applied to determine the river axis. The above requirements can be also taken into consideration in other methods for determining the river axis.

2. Materials and Methods The proposed method makes a reference to the approach that had been previously deployed by [48,49] to model a network of corridors in buildings. In the present study, the described approach was used to model a river channel based on geometric data. For the needs of this study, the presented approach was modified to model elongated objects characterized by varied width and narrow segments due to the presence of hydraulic structures in the river channel. Due to variations in river width, a universal approach to selecting midpoints on polygon centerlines was adopted. In this study and in the authors’ previous research, line segments intersecting polygons were generated by developing a Triangulated Irregular Network (TIN). Segments that intersect the polygon in a direction perpendicular to river flow (across) were selected by buffering (masking). The selected edges were used to generate polygon midpoints. In a watercourse with varied width, edges that intersect the river in a direction perpendicular to river flow (across) could not be selected by buffering. In the previous study, polygons were segmented with the use of VDs. In the present study, this operation was performed based on selected TIN edges. Selected TIN edges were used to divide the polygon into segments. Segments of the polygon and the midpoints of selected TIN edges were used to generate the centerline based on topographic relations. The proposed ISPRS Int. J. Geo-Inf. 2020, 9, 304 6 of 20 method is not influenced by polygon features (geometric shape), and only two points have to be determined: the beginning and the end of the river. The new method is described in detail in successive parts of the article. The method for generating a geometric model of a polygon’s centerline was tested on a section of the Łyna River. The river was represented by a polygon POLYGONRIVER . Lines representing { } the river’s left (Left_Bank) and right (Right_Bank) banks and the boundary lines of river (Island_Boundary) were derived from the polygon’s boundaries. Lines denoting river boundaries in the examined area, i.e., within the administrative boundaries of the city of Olsztyn, were also derived n RIVER o (River Boundary_City). A set of points POINTBOUNDARY (1) denoting breaks in polygon lines was generated based on the polygon POLYGONRIVER . { } n RIVER o POLYGONRIVER POINTBOUNDARY , (1) { } −−−−−−→generation n o The resulting dataset POINTRIVER was used to generate the TIN , (2). BOUNDARY { }

n RIVER o POINTBOUNDARY TIN , (2) −−−−−−→generation { }

TIN edges intersecting the river channel were selected based on the polygon POLYGONRIVER { } and the generated TIN (3).

POLYGONRIVER TIN = TINRIVER, (3) { } ∩ { } TIN edges which touch the boundaries on opposing river banks and represent adjacent segments of the river were selected from the set of TIN edges TINRIVER to generate the centerline { } of the examined river (4). This approach to selecting TIN edges is the fundamental part of the proposed methodology. n SELECTo TINRIVER TINRIVER , (4) { } −−−−→select In the solutions proposed by other authors, such as Meisner et al. (2016), the skeleton is generated based on the entire dataset TINRIVER (3). In the next stage, the skeleton is adjusted to centerlines. { SELEKT } The selected edges TINRIVER were used to automatically generate the midpoints of the river channel MIDPOINT (5). { } n SELECTo TINRIVER MIDPOINT , (5) −−−−−−→generation { }

The MIDPOINT set contains only points inside the polygon POLYGONRIVER . Two points { } { } denoting the beginning and end of the examined river have to be added to the dataset. These points are generated from a segment of the line denoting the boundary of the analyzed area {River Boundary_City} (6). They are the midpoints of polygon edges representing the boundaries of the examined area (administrative boundaries of the city) {River Boundary_City}.  River Boundary_City MIDPOINTBOUNDARY , (6) } −−−−−−→generation { }

The sum of MIDPOINT and {MIDPOINT } datasets is the set of midpoints of the river { } BOUNDARY channel POINT (7). { AXIS} MIDPOINT MIDPOINT = POINT , (7) { } ∪ { BOUNDARY} { AXIS} ISPRS Int. J. Geo-Inf. 2020, 9, 304 7 of 20

ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 7 of 21 The centerline of the river cannot be determined based only on dataset POINTAXIS alone. n SELECTo { } NeighboringThe centerline points of the have river to becannot identified. be determined It was assumed based only that onTIN dataset {𝑃𝑂𝐼𝑁𝑇divides the} alone. polygon RIVER NeighboringPOLYGON pointsRIVER have} into to segments be identified.SEGMENT It wasRIVER assumed(8). that {𝑇𝐼𝑁 } divides the polygon { } { } {𝑃𝑂𝐿𝑌𝐺𝑂𝑁}} into segments {𝑆𝐸𝐺𝑀𝐸𝑁𝑇} (8). SELECT TINRIVER POLIGONRIVER = SEGMENTRIVER , (8) 𝑇𝐼𝑁 ∩ {𝑃𝑂𝐿𝐼𝐺𝑂𝑁∩ { } ={𝑆𝐸𝐺𝑀𝐸𝑁𝑇} { }, } (8)

At leastAt least two twopoints points from from the theset { set𝑃𝑂𝐼𝑁𝑇POINT}AXIS are arepositioned positioned on the on theboundary boundary of the of thepolygon polygon { } segment{𝑆𝐸𝐺𝑀𝐸𝑁𝑇SEGMENT } . The river centerline can be generated based on the neighborhood relations segment n RIVER. The river o centerline can be generated based on the neighborhood { } base relationsbetween between datasets datasetsSEGMENT {𝑆𝐸𝐺𝑀𝐸𝑁𝑇 and} andPOINT {𝑃𝑂𝐼𝑁𝑇AXIS (9).} (9). A segment A segment of the of riverthe river channel channel is mapped is RIVER { } mappedbetween between two selected two selected points points from setfromPOINT set {AXIS𝑃𝑂𝐼𝑁𝑇if these} if points these are points positioned are positioned on the boundary on the of { } boundaryone segment of one fromsegment set fromSEGMENT set {𝑆𝐸𝐺𝑀𝐸𝑁𝑇RIVER . }. { }

({𝑃𝑂𝐼𝑁𝑇}, {𝑆𝐸𝐺𝑀𝐸𝑁𝑇}) ⎯⎯⎯⎯⎯ 𝑇𝑂𝑃𝑂𝐿𝑂𝐺𝑌 𝑅𝐼𝑉𝐸𝑅 𝐶𝐸𝑁𝑇𝐸𝑅𝐿𝐼𝑁𝐸 ( POINTAXIS , SEGMENTRIVER) TOPOLOGY RIVER CENTERLINE(9) (9)

{ } {{ }} −−−−−−→generate In popular solutions that rely on TIN edges, a skeleton is generated for the entire polygon based on all midpointsIn popular of solutions TIN edges that within rely on polygon TIN edges, boundaries a skeleton (selection is generated of internal for the entire triangles). polygon As baseda result,on allthemidpoints polygon centerline of TIN edges is generated within polygon with all boundaries side streams. (selection In the ofadopted internal methodology, triangles). As data a result, edgethe TIN polygon for generating centerline the is skeleton generated and with the centerli all sidene streams. are prepared In the first. adopted The midpoints methodology, of selected data edge TINTIN edges for generatingare used to the generate skeleton the and polygon the centerline centerline are prepared only. Therefore, first. The midpointsside streams of selectedare not TIN generatededges arein the used skeleton. to generate the polygon centerline only. Therefore, side streams are not generated in theThe skeleton. adopted methodology is illustrated by the example presented in Figure 6. The polygon contains Thethree adopted types of methodology triangles. In the is illustratedtraditionalby approach, the example the skeleton presented is based in Figure on all6. TIN The edges polygon (Figurecontains 5, Figure three 9a). types When of triangles. the polygon In the centerline traditional line approach, crosses two the points, skeleton for is example based on 𝐴−𝐷 all TIN, TIN edges (Figure 5, Figure9a). When the polygon centerline line crosses two points, for example A D, TIN edge edge 𝐺𝐸 does not intersect the main polygon axis. This edge should not be taken into consideration− in theGE presenteddoes not intersect method. the When main this polygon edge is axis. elim Thisinated, edge the should polygon not beaxis taken is determined into consideration based on in the selectedpresented TIN edges method. (𝐺𝐵 When,𝐵𝐸,𝐶𝐸 this). edge The topological is eliminated, relations the polygon between axis ispoints determined A, D, and based the on midpoints selectedTIN of selectededges ( GBTIN, BEedges, CE vs.). The three topological triangles and relations a polygo betweenn with points vertices A, D,F, andG, B, the E are midpoints taken into of selectedaccount TIN in theedges process vs.three of determining triangles and the a polygon polygon axis. with The vertices results F, G,are B, presented E are taken in intoFigure account 9b. in the process of determining the polygon axis. The results are presented in Figure9b.

(a) (b)

FigureFigure 9. A 9. comparisonA comparison of two of two methods: methods: (a) ( aa) traditional a traditional approach approach wher wheree the the skeleton isis basedbased on on three threetypes types of of triangles; triangles; (b )(b the) the solution solution adopted adopted in the in proposedthe proposed algorithm algorithm (based (based on the on data the indata Figure in 4). Figure 4). The proposed methodology was tested on a dataset representing a fragment of river channel withinThe proposed the administrative methodology boundaries was tested of a city.on a The data presentedset representing solution a is frag developedment of with river the channel use of GIS withintools the in administrative ArcMap, ESRI boundaries [14]. of a city. The presented solution is developed with the use of GIS tools in ArcMap, ESRI [14]. 3. Results 3. Results 3.1. Research Site 3.1. ResearchThe Site proposed method was tested on data from the public Database of Topographic Objects in 1:10,000The proposed scale (BDOT_10) method was created tested in on 2012. data The from fragment the public of the Database Łyna River of Topographic within the administrative Objects in 1:10,000 scale (BDOT_10) created in 2012. The fragment of the Łyna River within the administrative boundaries of the city of Olsztyn in the Region of Warmia and Mazury, Poland, was represented by a single polygon (Figure 10).

ISPRS Int. J. Geo-Inf. 2020, 9, 304 8 of 20 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 8 of 21 boundaries of the city of Olsztyn in the Region of Warmia and Mazury, Poland, was represented by a single polygon (Figure 10). ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 8 of 21

Figure 10. Research site in an Open Street Map (OSM): (a) map of Europe, (b) fragment of the Łyna River within the administrative boundaries of Olsztyn city.

TheFigure Łyna 10. ResearchRiver is sitea meandering in an Open Street watercourse Map (OSM): with ( avaried) map of channel Europe, width. ( b) fragment The river of the features Ł Łynayna an islandRiver and within hydraulic the administrative structures boundarieswhich considerably of Olsztyn city.narrow down the river channel in selected locations (Figure 11). The Łyna River was selected for testing the proposed methodology due to its meanderingThe Ł Łynayna geometry River is is and a a meandering meandering the presence watercourse watercourse of distributary with with channels. varied varied channel channel width. width. The The river river features features an anisland islandThe and centerline and hydraulic hydraulic of thestructures structures river from which which the BDOT_10considerably considerably database narrow narrow was down downedited the the semi-manually river river channel channel byin selecting selected pointslocations on (Figure both river 11).11). The Thebanks Ł Łynayna (polygons), River was and selected it was for drawn testing with the proposedthe software methodology tool. The due resulting to its centerlinemeandering does geometry not account and thefor presencethe river’s of course distributary on both channels.channels. sides of the island. The centerline of the river from the BDOT_10 database was edited semi-manually by selecting points on both river banks (polygons), and it was drawn with the software tool. The resulting centerline does not account for the river’s course on both sides of the island.

Figure 11. Research site: ( (aa)) fragment fragment of of the the river river within within the the ad administrativeministrative boundaries boundaries of of Olsztyn; Olsztyn; (b) hydraulic structure in the river channel; ( c) river island by the hydraulic structure; ( d) river axis from the BDOT_10 database. Figure 11. Research site: (a) fragment of the river within the administrative boundaries of Olsztyn; The centerline of the river from the BDOT_10 database was edited semi-manually by selecting 3.2. Implementation(b) hydraulic structure of the Proposed in the river Method channel; (c) river island by the hydraulic structure; (d) river axis points on both river banks (polygons), and it was drawn with the software tool. The resulting centerline from the BDOT_10 database. doesThe not accountedges intersecting for the river’s the courseriver channel on both were sides det ofermined the island. in the first stage of the study. A TIN was developed based on the points denoting river banks using the Delaunay triangulation algorithm 3.2. Implementation of the Proposed Method (Figure3.2. Implementation 12, Figure 13). of the TIN Proposed edgesMethod positioned inside the river channel {𝑇𝐼𝑁}were selected, and TIN edgesThe edges touching intersecting the bank the onriver one channel side of were the riverdetermined were eliminated. in the first stageThe resulting of the study. TIN Aedges TIN The edges intersecting the river channel were determined in the first stage of the study. A TIN intersectwas developed the river based channel on the in points a directio denotingn perpendicular river banks usingto river the flowDelaunay (across) triangulation {𝑇𝐼𝑁 algorithm} (Figure was developed based on the points denoting river banks using the Delaunay triangulation algorithm 13d,(Figure Figure 12, Figure14b, Figure 13). TIN14d). edges positioned inside the river channel {𝑇𝐼𝑁}were selected, and (Figure 12, Figure 13). TIN edges positioned inside the river channel TINRIVER were selected, and TIN TIN edges touching the bank on one side of the river were eliminated.{ The} resulting TIN edges edges touching the bank on one side of the river were eliminated. The resulting TIN edges intersect the intersect the river channel in a direction perpendicular to rivern flow (across)o {𝑇𝐼𝑁} (Figure river channel in a direction perpendicular to river flow (across) TINSELECT (Figure 13d, Figure 14b,d). 13d, Figure 14b, Figure 14d). RIVER

ISPRS Int. J. Geo-Inf. 2020, 9, 304 9 of 20

ISPRSISPRS Int.Int. J. J. Geo-Inf. Geo-Inf. 2020 2020, ,9 9, ,x x FOR FOR PEER PEER REVIEW REVIEW 9 9 of of 21 21 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 9 of 21

FigureFigure 12. 12. TriangulatedTriangulated Irregular Irregular Network Network Triangulated Triangulated IrregularIrregular NetworkNetwork (TIN);(TIN); ( (aaa))) fragment fragmentfragment of ofof the thethe Figure 12. Triangulated Irregular Network Triangulated Irregular Network (TIN); (a) fragment of the riverriver withinwithinwithin the thethe administrative administrativeadministrative boundaries boundariesboundaries of Olsztyn; ofof Olsztyn;Olsztyn; (b) TIN ((b modelb)) TINTIN generated modelmodel generatedgenerated based on breakpoints basedbased onon river within the administrative boundaries of Olsztyn; (b) TIN model generated based on breakpointsinbreakpoints the river bank inin thethe line riverriver within bankbank the lineline administrative withinwithin ththee administrativeadministrative boundaries of boundariesboundaries Olsztyn city. ofof OlsztynOlsztyn city.city. breakpoints in the river bank line within the administrative boundaries of Olsztyn city.

FigureFigure 13.13. GenerationGeneration ofof edgesedges intersectingintersecting thethe riverriver channelchannel inin aa directiondirection perpendicularperpendicular toto riverriver FigureFigure 13.13.Generation Generation of of edges edges intersecting intersecting the the river river channel channel in a in direction a direction perpendicular perpendicular to river to flowriver flowflow (across)(across) aa)) pointspoints situatedsituated onon thethe bankbank line,line, bb)) TINTIN model,model, cc)) TINTIN edgesedges positionedpositioned insideinside thethe (across)flow (across) (a) points a) points situated situated on the on bank the line,bank ( bline,) TIN b) model, TIN model, (c) TIN c) edges TIN edges positioned positioned inside inside the river the riverriver channel,channel, dd)) selectionselection ofof edgesedges touchitouchingng opposingopposing riverriver banks.banks. channel,river channel, (d) selection d) selection of edges of edges touching touchi opposingng opposing river banks.river banks.

FigureFigure 14.14. SelectionSelection ofof TINTIN edgesedges inin specialspecial locations:locations: ((aa)) islandisland inin thethe riverriver channel,channel, TINTIN edgesedges inin thethe Figure 14. Selection of TIN edges in special locations: (a) island in the river channel, TIN edges in the riverFigureriver channel;channel; 14. Selection ((bb)) selectedselected of TIN segmentssegments edges in ofof special TINTIN edgesedges locations: inin thethe (a river)river island channel;channel; in the ( river(cc)) hydraulichydraulic channel, structure,structure, TIN edges TINTIN in river channel; (b) selected segments of TIN edges in the river channel; (c) hydraulic structure, TIN edges;theedges; river ((dd)) channel; selectedselected segments (segmentsb) selected ofof TIN segmentsTIN edgesedges of inin TINthethe riverriver edges channelchannel in the by riverby thethe channel; hydraulichydraulic (c structure.)structure. hydraulic structure, TINedges; edges; (d) selected (d) selected segments segments of TIN of TIN edges edges in the in theriver river channel channel by the by thehydraulic hydraulic structure. structure. TINTIN edgesedges denotingdenoting opposingopposing riveriverr banksbanks werewere selectedselected basedbased onon topologicaltopological relations.relations. InIn thethe TINTIN edgesedges denotingdenoting opposingopposing riverriver banksbanks werewere selectedselected basedbased onon topological topologicalrelations. relations. InIn thethe proposedproposed solution,solution, edgesedges werewere selectedselected basedbased onon thethe neighborhoodneighborhood relationsrelations betweenbetween TINTIN edgesedges andand proposedproposed solution, solution, edges edges werewere selectedselected basedbased onon thethe neighborhoodneighborhoodrelations relationsbetween betweenTIN TINedges edges andand thethe polygonspolygons adjacentadjacent toto thethe river.river. TopologicalTopological rerelationslations werewere generatedgenerated basedbased onon thethe boundaryboundary lineslines the polygons adjacent to the river. Topological relations were generated based on the boundary lines ofof thethe riverriver andand thethe citycity (boundaries(boundaries ofof thethe examinedexamined area),area), thethe polygonpolygon onon ththee leftleft bank,bank, thethe polygonpolygon of the river and the city (boundaries of the examined area), the polygon on the left bank, the polygon onon thethe rightright bank,bank, andand thethe polygonpolygon representingrepresenting thethe riverriver islandisland (Figure(Figure 15).15). TheThe neighborhoodneighborhood on the right bank, and the polygon representing the river island (Figure 15). The neighborhood

ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 10 of 21 ISPRS Int. J. Geo-Inf. 2020, 9, 304 10 of 20 relations between the river boundary and the polygons adjacent to the river are presented in Figure the15b. polygons The “Joining adjacent Data to by the Location river. Topological (Spatially)” relations tool was were used generated to assign based the ID on numbers the boundary of adjacent lines ofpolygons the river to and TIN the edges. city (boundaries TIN edges ofwere the examinedselected with area), the the “Select polygon by onLocation” the left bank,GIS tool the polygonand the on“Touch the right the boundary bank, and of” the option. polygon These representing operations thewere river iterated island to (Figureanalyze 15 different). The neighborhoodneighborhood relationsrelations betweenfor all TIN the edges. river boundary The TIN and edges the selected polygons in adjacent successive to the iterations river are are presented marked in in Figure different 15b. Thecolors “Joining in Figure Data 15b. by Location (Spatially)” tool was used to assign the ID numbers of adjacent polygons to TINThe edges. selected TIN edges edges TIN were {𝑇𝐼𝑁 selected } with intersected the “Select the byriver Location” channel GISin a tooldirection and the perpendicular “Touch the boundaryto river flow of” (across). option. These operations were iterated to analyze different neighborhood relations for all TIN edges. The TIN edges selected in successive iterations are marked in different colors in Figure 15b.

Figure 15.15. Topological (neighborhood) relations between TIN edgesedges andand polygons:polygons: (a) graphicgraphic presentationpresentation ofof neighboringneighboring polygons; polygons; (b ()b presentation) presentation of of topological topological relations relations in thein the database, database, and and the TINthe edgesTIN edges selected selected in successive in successive iterations basediterations on topological based on relationships topological (markedrelationships in diff erent(marked colors). in different colors). n SELECTo The selected edges TIN TINRIVER intersected the river channel in a direction perpendicular to riverThe flow presented (across). methodology does not generate centerlines in side streams and distributary channels.The presentedTIN edges methodologyin side streams does are eliminated not generate because centerlines they touch in side the streams polygon’s and boundary distributary line channels.on one side TIN of edgesthe river, in side left streamsor right are(Figure eliminated 16). because they touch the polygon’s boundary line on one side of the river, left or right (Figure 16).

ISPRS Int. J. Geo-Inf. 2020, 9, 304 11 of 20 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 11 of 21 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 11 of 21

(a) (b) (a) (b)

FigureFigure 16.16. AutomaticAutomatic eliminationelimination of of TIN TIN channels channels in distributaryin distributary channels channels during duringTIN RIVER{𝑇𝐼𝑁 } { }−−−−→select Figure 16. Automatic elimination of TIN channels in distributary channels during {𝑇𝐼𝑁 } n⎯⎯ {𝑇𝐼𝑁SELEKTo } (4). The centerlines of side streams are not generated because TIN edges were TIN (4). The centerlines of side streams are not generated because TIN edges were eliminated. ⎯⎯RIVER{𝑇𝐼𝑁 } (4). The centerlines of side streams are not generated because TIN edges were n o eliminated. (a) TIN edges in the river channel {𝑇𝐼𝑁}; (b) selected TIN SELECTedged {𝑇𝐼𝑁 } (a) TIN edges in the river channel TINRIVER ;(b) selected TIN edged TINRIVER . eliminated. (a) TIN edges in the river{ channel} {𝑇𝐼𝑁}; (b) selected TIN edged {𝑇𝐼𝑁 } n SELECT o MidpointsMidpoints {MIDPOINT}(5){MIDPOINT} (5) werewere generated generated based based on on selected selected edges edges {TIN𝑇𝐼𝑁 }.. These These points points Midpoints {MIDPOINT}(5) were generated based on selected edges {𝑇𝐼𝑁RIVER}. These points areare situated situated inside inside the the river channel (Figure 11).11). The The centerline centerline of of the the analyzed analyzed river river was was generated generated are situated inside the river channel (Figure 11). The centerline{ of the }analyzed river was{ generated} basedbased on thethe topologicaltopological relations relations between between segments segmentsSEGMENT 𝑆𝐸𝐺𝑀𝐸𝑁𝑇RIVER(8) (8) and and points pointsPOINT 𝑃𝑂𝐼𝑁𝑇AXIS(7). based on the topological relations between segments{ {𝑆𝐸𝐺𝑀𝐸𝑁𝑇} } (8) and{ points{ {}𝑃𝑂𝐼𝑁𝑇} } (7).A segment A segment of the of centerlinethe centerline was was generated generated between between two pointstwo points from from the POINT the 𝑃𝑂𝐼𝑁𝑇AXIS dataset dataset if these if (7). A segment of the centerline was generated between two points from{ the {𝑃𝑂𝐼𝑁𝑇} } dataset if thesepoints points touched touched the edge the edge of one of segmentone segment from from the dataset the datasetSEGMENT {𝑆𝐸𝐺𝑀𝐸𝑁𝑇RIVER. An}. An algorithm algorithm from from the these points touched the edge of one segment from the dataset{ {𝑆𝐸𝐺𝑀𝐸𝑁𝑇 } }. An algorithm from theGeospatial Geospatial Data Data Abstraction Abstraction Library Library (GDAL) (GDAL) was used was for used data for processing. data processing. The centerline The centerline generated the Geospatial Data Abstraction Library (GDAL) was used for data processing. The centerline generatedin selected in segments selected ofsegments the analyzed of the riveranalyzed is presented river is presented in Figure 17 in. Figure 17. generated in selected segments of the analyzed river is presented in Figure 17.

a) b) c) a) b) c)

Figure 17. Centerline of the river channel in special locations: (a) ; (b) river island; (c) Figure 17. Centerline of the river channel in special locations: (a) floodplain; (b) river island; (c) narrowFigure 17.segmentCenterline of the of river the riverby the channel hydraulic in special structure. locations: (a) floodplain; (b) river island; (c) narrow segmentnarrow segment of the river of the by river the hydraulic by the hydraulic structure. structure. Adjustments are required in the centerline of the river segment near the island. Two segments that formAdjustments loops should are required be eliminated. in the centerlineThe centerline of the by river the segmenthydraulicsegment near structure the island.island. should Two be adjusted.segments Acutethat form angles loops in the should centerline be eliminated. should beThe The eliminat centerline centerlineed. Theby by the thecenterline hydraulic hydraulic should structure structure be generalized should should be be adjusted. adjusted.with the useAcute of theangles available in the methods centerline [50]. should be eliminated. The centerline should be generalized with the use of the available methods [50].

ISPRS Int. J. Geo-Inf. 2020, 9, 304 12 of 20 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 12 of 21

Acute3.3. Verification angles in theof the centerline Proposed should Method be with eliminated. an ESRI Tool The centerlineand a Tool shouldBased on be the generalized Voronoi Diagram with the use of the available methods [50]. The proposed solution was verified with the use of the “Polygon to centerline” option in ESRI 3.3.software Verification that relies of the Proposedon the MAT Method algorithm. with an ESRIAccording Tool and to athe Tool description Based On the of Voronoithe ESRI Diagram tool, adaptive densification is applied to the input features to improve centerline quality. The center of the The proposed solution was verified with the use of the “Polygon to centerline” option in ESRI polygon, generated with the ESRI tool based on the same data, represents the Łyna River, and it is software that relies on the MAT algorithm. According to the description of the ESRI tool, adaptive shown in Figure 18 against the TIN edges from Figure 17. The network generated with the ESRI tool densification is applied to the input features to improve centerline quality. The center of the polygon, is largely consistent with the results presented in Figure 18, and discrepancies are observed only in generated with the ESRI tool based on the same data, represents the Łyna River, and it is shown in the proximity of and large river bends. The centerline generated with the ESRI tool in the Figure 18 against the TIN edges from Figure 17. The network generated with the ESRI tool is largely vicinity of the hydraulic structure runs closer to the central part of the floodplain. Downstream from consistent with the results presented in Figure 18, and discrepancies are observed only in the proximity the hydraulic structure, the centerline breaks at acute angles. The solution based on the TIN of floodplains and large river bends. The centerline generated with the ESRI tool in the vicinity of the produced similar results. The presented method should be simplified. hydraulic structure runs closer to the central part of the floodplain. Downstream from the hydraulic According to ESRI guidelines, the input features are densified to improve the quality of the structure, the centerline breaks at acute angles. The solution based on the TIN produced similar results. generated centerline. As a result, the centerline of the analyzed river was generated based on a much The presented method should be simplified. higher number of points than in the TIN approach.

n o Figure 18. Segments of the river centerline generated with the ESRI tool and {𝑇𝐼𝑁SELECT } developed Figure 18. Segments of the river centerline generated with the ESRI tool and TINRIVER developed byby the the authors authors in in special special locations: locations: (a(a)) floodplain; floodplain; ( b(b)) river river island; island; ( c()c) narrow narrow river river segment segment by by the the hydraulichydraulic structure. structure.

AccordingThe diagram to ESRIin Figure guidelines, 19 reveals the inputdifferences features between are densified the solution to improve developed the qualityby the authors of the generatedand that generated centerline. with As a the result, ESRI the tool. centerline In the floodplain of the analyzed (Figure river 19a), was the generated location basedof the oncenterlines a much highergenerated number by the of points compared than inapproaches the TIN approach. differs by up to 15 m (the river channel has a width of aroundThe 100 diagram m). The in compared Figure 19 centerlinesreveals diff areerences consiste betweennt in straight-line the solution segments developed of the by theriver authors (Figure and19a). that The generated solution with generated the ESRI with tool. the In theESRI floodplain tool is different (Figure 19 becausea), the location the input of the features centerlines were generateddensified, by and the the compared output was approaches smoothed diff anders bywritten up to as 15 a m spline. (the river channel has a width of around 100 m). The compared centerlines are consistent in straight-line segments of the river (Figure 19a). The solution generated with the ESRI tool is different because the input features were densified, and the output was smoothed and written as a spline.

ISPRS Int. J. Geo-Inf. 2020, 9, 304 13 of 20 ISPRSISPRS Int. Int. J. J. Geo-Inf. Geo-Inf. 2020 2020, 9, 9, x, x FOR FOR PEER PEER REVIEW REVIEW 13 13 of of 21 21

Figure 19. The results of the compared approaches: (a) graphic presentation of the compared FigureFigure 19.19.The The results results of theof comparedthe compared approaches: approaches: (a) graphic (a) graphic presentation presentation of the compared of the compared solutions; solutions;(bsolutions;) features (b( ofb) ) the featuresfeatures centerline ofof thethe generated centerlinecenterline by the generatedgenerated proposed byby method; thethe proposedproposed (c) features method;method; of the centerline (c(c) ) featuresfeatures generated ofof thethe centerlinewithcenterline the ESRI generated generated tool. with with the the ESRI ESRI tool. tool.

TheTheThe proposed proposedproposed approach approach does does does not not not generate generate generate centerlin centerlin centerlineseses in in distributary indistributary distributary channels channels channels (Figure (Figure (Figure 20). 20). The 20The). banksThebanks banks of of side side of sidestreams streams streams are are incorporated areincorporated incorporated into into intopolygo polygo polygonsnsns representing representing representing the the right theright right or or left orleft leftriver river river bank. bank. bank. In In hydrologicalInhydrological hydrological practice, practice, practice, distributary distributary distributary channels channels channels are are areusually usually usually eliminated eliminated eliminated in in inthethe the process process process of of ofgenerating generating generating a a network.anetwork. network.

FigureFigureFigure 20. 20.20. Centerlines CenterlinesCenterlines generated generatedgenerated by the byby compared thethe comparedcompared methods: methods:methods: (a) centerlines (a(a) ) centerlinescenterlines are consistent areare in consistentconsistent straight-line inin straight-linesegmentsstraight-line of thesegments segments river; ( bof of,c the) the the river; river; proposed ( b(b) )and and solution ( c()c )the the does proposed proposed not generate solution solution centerlines does does not not in generate generate distributary centerlines centerlines channels. in in distributarydistributary channels. channels. A centerline was also generated with VDs [38]. The stages of generating a centerline are presented in FigureAA centerlinecenterline 15a–c. The waswas generated alsoalso generatedgenerated skeleton with hadwith toVDsVDs be simplified[38][38]. . TheThe stagestostages produce ofof generatinggenerating a centerline. aa Thecenterlinecenterline centerline areare presentedgeneratedpresented in inin Figure diFigurefferent 15 15 segmentsa–c. a–c. The The generated ofgenerated the river skeleton skeleton is shown had had in Figureto to be be simplified simplified 21d–f. to to produce produce a a centerline. centerline. The The centerlinecenterline generated generated in in different different segments segments of of the the river river is is shown shown in in Figure Figure 21 21 d–f. d–f.

ISPRSISPRS Int. Int. J. Geo-Inf. J. Geo-Inf. 20202020, 9,,9 x, 304FOR PEER REVIEW 14 of 14 20of 21

Figure 21. The centerline of a polygon generated with a tool based on the VD algorithm; (a) a view of Figureselected 21. riverThe centerline segments; of (b )a generatedpolygon generated skeleton model. with a Centerlinestool based on in (thec) the VD floodplain, algorithm; (b ()a near) a view the of selectedisland, river (e) by segments; the hydraulic (b) structure.generated ( fskeleton) A zigzag model. centerline Centerlines in straight-line in (c) the segments floodplain, of the (b river.) near the island, (e) by the hydraulic structure. (f) A zigzag centerline in straight-line segments of the river. Additional parameters for comparing the results generated by the proposed method, the ESRI tool and the VD tool are presented in Table1. The analyzed segment of the river has a length of Additional parameters for comparing the results generated by the proposed method, the ESRI approximately 15 km. The centerline generated by the proposed algorithm is 29 m shorter, and it is toolcomposed and the ofVD 2646 tool segments are presented (50% less in than Table in the1. Th ESRIe analyzed approach). segment The results of the were river used has to a generate length of approximatelynetwork models 15 km. with The the usecenterline of Network generated Analyst by tools.the proposed The shortest algorithm paths betweenis 29 m shorter, the beginning and it is composedand end pointsof 2646 of segments the analyzed (50% river less segmentthan in the were ESRI generated approach). with The the results use of Dijkstra’swere used algorithm. to generate networkThese values models can with be compared the use of because Network they Analyst do not containtools. The loops shortest and do paths not account between for the distributary beginning andchannels. end points In the of proposed the analyzed solution, river the segment Łyna River were is around generated 26 m with longer the than use in of the Dijkstra’s model developed algorithm. Thesewith values the ESRI can tool. be compared The difference because is lessthey than do not 2% contain relative loops to river and length. do not The account river for described distributary by channels.the centerline In the generated proposed with solution, VDs is the longest, Łyna which River canis around be attributed 26 m to longer the zigzag than centerlinein the model in developedstraight-line with segments the ESRI of thetool. river The (Figure difference 20f). Theis le dissff erencethan 2% in riverrelative length to determinedriver length. with The ESRI river describedand VD methodsby the centerline is 283 m. Thegenerated difference with of 26VDs m representsis longest, only which 10% can of 283 be m.attributed to the zigzag centerline in straight-line segments of the river (Figure 20f). The difference in river length determined with ESRI and VDTable methods 1. River featuresis 283 m. in theThe compared difference approaches. of 26 m represents only 10% of 283 m. Automatically Standard Network Number of Average Maximum River Length Generated Length of Deviation Generation Edges on the Edge Edge Described by the the River’s Center of Edge Method Table 1. RiverCenterline features in theLength comparedLength approaches. Shortest Path line Length Proposed Automatically Standard River Length Network 15,014 mNumber 2646 of Average 5.6 m Maximum 82.7 m 4.5 14,865 m method Generated Length Deviation Described Generation Edges on the Edge Edge of the15,097 River’s m of Edge by the MethodESRI tool The output contains Centerline5307 Length 2.8 m Length 26.9 m 2.1 14,839 m distributaryCenter line channels Length Shortest Path ProposedVoronoi 15014 m 2646 5.6 m 82.7 m 4.5 14865 m methodDiagram 15,122 m 3940 3.8 38.2 2.7 15,122 m tool (VD) 15097 m ManualThe 14,669output m 1048 13.9 93.6 12.1 14,669 m ESRI tool contains 5307 2.8 m 26.9 m 2.1 14839 m 3.4. A Comparisondistributary of Automatically and Manually Generated Centerlines The comparisonchannels was performed based on public resource data. Vector data describing the river Voronoi channel and the centerline were obtained from the BDOT database. The river axis was generated Diagram tool 3940 3.8 38.2 2.7 15122 m manually. It is most15122 highly m generalized and characterized by the smallest number of segments and the (VD) longest segments. The watercourse has a length of 14,669 m. It is based on only 1048 edges, and it Manual 14669 m 1048 13.9 93.6 12,1 14669 m shorter than the shortest paths generated by the proposed method as well as ESRI and VD tools. 3.4. A Comparison of Automatically and Manually Generated Centerlines

ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 15 of 21

The comparison was performed based on public resource data. Vector data describing the river channel and the centerline were obtained from the BDOT database. The river axis was generated manually. It is most highly generalized and characterized by the smallest number of segments and the longest segments. The watercourse has a length of 14,669 m. It is based on only 1048 edges, and it shorterISPRS than Int. J. Geo-Inf.the shortest2020, 9, 304paths generated by the proposed method as well as ESRI and VD tools.15 of 20 Three automatically generated centerlines and one manually generated centerline are presented in Figure 22. In meandering segments, the manually derived centerline better fits river bends. The Three automatically generated centerlines and one manually generated centerline are presented centerline created with the proposed method is more consistent with the centerline generated with in Figure 22. In meandering segments, the manually derived centerline better fits river bends. the VD tool and the manually generated centerline than the centerline generated with the ESRI tool. The centerline created with the proposed method is more consistent with the centerline generated with The generated centerlines are consistent in straight-line segments of the river within a margin of 1.5 the VD tool and the manually generated centerline than the centerline generated with the ESRI tool. m (the average width of the river channel is around 16 m), which accounts for only 9.3% of river The generated centerlines are consistent in straight-line segments of the river within a margin of 1.5 m width.(the average width of the river channel is around 16 m), which accounts for only 9.3% of river width.

Figure 22. A centerline generated manually based on the image of the river channel, and the centerlines Figure 22 A centerline generated manually based on the image of the river channel, and the generated by the proposed method, the ESRI tool and the VD tool: (a) floodplain; (b) river island; centerlines(c) narrow generated segment ofby the the river proposed by the me hydraulicthod, the structure. ESRI tool and the VD tool: (a) floodplain; (b) river island; (c) narrow segment of the river by the hydraulic structure The tools proposed by [51] were used to compare the centerlines of the river channel polygon. FourThe out tools of proposed the 50 generated by [51] controlwere used lines to intersecting compare the the centerlines river channel of the are river shown channel in Figure polygon. 23. FourThe out midpoints of the 50 of generated control lines control and lines the points intersecting at which the all river centerlines channel intersectare shown control in Figure lines 23. were The midpointsgenerated. of Fourcontrol sets lines of river and segments the points where at thewhich centerline all centerlines deviates fromintersect the centercontrol of lines the river were generated.channel wereFour created.sets of river The resultssegments are visualizedwhere the in centerline Figure 23 ,deviates and the statisticalfrom the parameterscenter of the of theriver channelgenerated were datasets created. are The presented results inare Table visualized2. in Figure 23, and the statistical parameters of the generatedThe datasets most appropriate are presented centerline in Table is di2. ffi cult to identify. In straight-line segments of the river, the generated centerlines are similar and consistent with the average values given in Table2. Greater deviations were noted in the floodplain and by the hydraulic structure. All methods produced comparable results. The values generated by the manual method deviate most considerably from the values generated by the remaining methods. The polygon axis is generalized. The greatest deviation relative to river width is 14.5%. The axes developed with the use of the VD tool and the proposed algorithm are characterized by the smallest deviations. The method based on the VD tool was characterized by the lowest statistical parameters (Table1), but the generated river was longest because its centerline is a zigzag line.

ISPRS Int. J. Geo-Inf. 2020, 9, 304 16 of 20 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 16 of 21

(b)

(a)

(c)

Figure 23. Centerlines in the control segments of the river channel; (a) control segments [44]; (b) Control lineFigure with 23. a lengthCenterlines of 61.68 in the m andcontrol the segments deviation of of the midpoints river channel; generated (a) control with di ffsegmentserent methods; [44]; (b) (c)Control control lineline withwith a a length length of 86.82of 61.68 m. Them and maximum the de deviationviation of of midpoints 10.11 m was generated noted for thewith manually different generatedmethods; line. (c) control line with a length of 86.82 m. The maximum deviation of 10.11 m was noted for the manually generated line. Table 2. Statistical parameters of the centerlines in the control segments of the river channel based onThe the most segments appropriate between centerline the midpoints is difficult of control to linesidentify. and theIn straight-line points where segments centerlines of intersect the river, the generatedcontrol segments.centerlines are similar and consistent with the average values given in Table 2. Greater deviations were noted in the floodplain and by the hydraulic structure. Deviation of Central Lines from the Center of the River Channel Based on Control Segments NetworkTable 2. Statistical parameters of the centerlines in the control segments of the river channel based on Maximum Deviation Generationthe segments between the midpoints of control lines and the points where centerlines intersect Method Relative to the Width of the Average Deviation Sum of 50 Standard control segments. River Channel [m] Deviations [m] Deviation [m]/[m] Deviation of Central Lines from the Center of the River Channel based on Proposed method 1.53/61.68Control 0.24 Segments 12.16 0.29 ESRINetwork tool 2.52/17.31 0.24 11.97 0.54 Maximum Deviation GenerationVD tool 0.46/61.68 0.13 6.29 0.11 Relative to the Width Average Sum of 50 Standard ManualMethod 11.66/95.19 2.44 121,76 2.99 of the River Channel Deviation [m] Deviations [m] Deviation 3.5. A Comparison of Formal BDOT_10[m]/[%] Requirements and Automatically Generated Centerlines Proposed 1.53/61.68 0.24 12.16 0.29 Themethod provisions of the regulation setting the formal requirements regarding the precision and accuracyESRI of thetool generated data2.52/17.31 should be taken into 0.24 account when evaluating 11.97 various methods0.54 for generatingVD rivertool axes. The first0.46/61.68 requirement is the distance 0.13 between points, 6.29 which should 0.11 not be less than 2 m.Manual The second requirement11.66/95.19 states that river 2.44 width should be 121,76 determined with 2.99 an accuracy of up to 20%. As noted in Section1, the accuracy of river width and the river axis depends on the

ISPRS Int. J. Geo-Inf. 2020, 9, 304 17 of 20 accuracy with which the river banks are determined. In the presented example, the river axis was also determined to the nearest 20%. The evaluated values are presented in Table3.

Table 3. Evaluation of centerlines based on the regulation relating to the BDOT_10 database.

Evaluation of Centerlines Based on the Regulation Relating to the BDOT_10 Network Generation Database Method Number of Edges on Maximum Deviation Accuracy of the River the Centerline/Number Relative to the Width of Axis for Maximum Edges Shorter than 2 m the River Channel Deviations Proposed method 2646/140 1.53/61.68 2.5% ESRI tool 5307/2012 2.52/17.31 14.5% VD tool 3940/1070 0.46/61.68 0.7% Manual 1048/0 11.66/95.19 1.2%

In the automatic generation method, the centerline is fragmented into a large number of segments. The highest fragmentation was observed in the ESRI method. A total of 2012 segments do not fulfill the requirements of the regulation. The smallest fragmentation was observed in the manual method, where all segments are longer than 2 m. In the proposed method, only 140 segments do not meet the relevant requirements. All automatically generated axes have to be simplified. The accuracy of the generated axes was determined based on 50 control segments (Table2). The axis generated by the ESRI method was characterized by the lowest accuracy, whereas the axis generated by the VD method was most accurate. It should be noted that river width was determined with an accuracy of up to 20%; therefore, the generated values are consistent with the relevant requirements. The values generated by the proposed method require fewest modifications for consistency with the BDOT_10 requirements. The presented results testify to the effectiveness of the proposed method.

4. Discussion and Conclusions The presented study proposes a new and simple algorithm for generating river centerlines. The presented solution was developed with the use of GIS tools in ArcMap. The proposed method for generating the centerline of a river polygon is based on selected TIN edges that intersect the river channel in a direction perpendicular to river flow (across). The main river axis was generated. The centerlines of distributary channels were not generated. This approach to selecting TIN edges is a fundamental part of the proposed methodology. The described method can also be used to generate the centerline of a single river in a polygon containing a river with distributary channels. The results of this study indicate that the proposed algorithm correctly generates the centerline of a river based on vector data. In straight-line segments of the river, the generated centerline is consistent with the centerlines generated in the remaining solutions. The centerline should be simplified in segments where the width of the river channel is significantly narrowed down by hydraulic structures. This modification is also required in the centerline generated with ESRI and VD tools. The proposed algorithm offers an alternative to the existing solutions, and its main advantage is that it is simpler than the remaining methods. Only the main river axis is generated, without local centerlines in the river’s distributary channels. The presented results indicate that the proposed method is correct and practical. The variations in the centerlines generated based on the same set of data indicate that none of the analyzed tools are ideal. The same algorithms should be used to generate centerlines that account for variations in river geometry over time. The application of different methods to generate the centerline of a watercourse can produce erroneous results. In the future, the proposed algorithm will be tested and modified in analyses of other objects with varied shapes, in particular a larger number of connected water bodies. ISPRS Int. J. Geo-Inf. 2020, 9, 304 18 of 20

Author Contributions: Conceptualization, El˙zbietaLewandowicz; Methodology, El˙zbietaLewandowicz; Software, Paweł Flisek; Validation, El˙zbietaLewandowicz; Formal Analysis, El˙zbietaLewandowicz; Writing-Original Draft Preparation, El˙zbietaLewandowicz; Writing-Review & Editing, El˙zbietaLewandowicz and Paweł Flisek; Visualization, El˙zbietaLewandowicz. All authors have read and agreed to the published version of the manuscript. Funding: This research was financed as part of a statutory research project of the Faculty of Geongineering of the University of Warmia and Mazury in Olsztyn, Poland, entitled “Geoinformation from the theoretical, analytical and practical perspective” (No. 28.610.033-300_timeline: 2017–2020). Acknowledgments: The authors are grateful to the Regional Center for Geodetic and Cartographic Documentation in Olsztyn for providing access to the Database of Topographical Objects in 1:10 000 scale. The acquired data supported analyses of the tested objects. Conflicts of Interest: The authors declare no conflict of interest.

References

1. Ło´s,H.; Osi´nska-Skotak,K.; Pluto-Kossakowska, J.; Bernier, M.; Yves, G.Y.; Pawłowski, B. Performance evaluation of quad-pol datacompare to dual-pol SAR data for river ice classification. Eur. J. Remote Sens. 2019, 52, 79–95. [CrossRef] 2. Gao, F.; Ma, F.; Wang, J.; Sun, J.; Yang, E.; Zhou, H. Visual Saliency Modeling for River Detection in High-Resolution SAR Imagery. Access IEEE 2018, 6, 1000–1014. [CrossRef] 3. Sarade, S.D.; Ghule, N.B.; Disale, S.P.; Sasane, S.R. Large ScaleSatellite Image Processing Using Hadoop Distributed System. Int. J. Adv. Res. Comput. Eng. Technol. 2014, 3, 731–735. 4. Ciecholewski, M. River channel segmentation in polarimetric SAR images: Watershed transform combined with average contrast maximization. Expert Syst. Appl. 2017, 82, 196–215. [CrossRef] 5. Arcelli, C.; Cordella, I.; Levialdi, S. Parallel thinning of binary pictures. Electron. Lett. 1975, 11, 148–149. [CrossRef] 6. Greenlee, D.D. Raster and Vector Processing for Scanned Linework. Photogramm. Eng. Remote Sens. 1987, 53, 1383–1387. 7. Hasthorpe, J.; Mount, N. The generation of river channel skeletons from binary images using raster thinning algorithms. In Proceedings of the Geographical Information Science Research UK Conference, Ireland Maynooth, Ireland, 11–13 April 2007. 8. Pavelsky, T.M.; Smith, L.C. A software tool for the calculation of river widths from remotely sensed imagery. IEEE Geosci. Remote Sens. Lett. 2008, 5, 70–73. [CrossRef] 9. Zeng, C.; Bird, S.; Luce, J.J.; Wang, J.A. Natural-Rule-Based-Connection (NRBC) Method for River Network Extraction from High-Resolution Imagery. Remote Sens. 2015, 7, 14055–14078. [CrossRef] 10. Obida, C.B.; Blackburn, G.A.; Whyatt, J.D.; Kirk, T. River network delineation from Sentinel-1 SAR data. Int. J. Appl. Earth Obs. Geoinf. 2019, 83, 101910. [CrossRef] 11. Holt, C.M.; Stewart, A.; Clint, M.; Perrott, R. An Improved Parallel Thinning Algorithm. Commun. ACM 1987, 30, 156–160. [CrossRef] 12. Zhang, Y.Y.; Wang, P.S.P. A modified parallel thinning algorithm. In Proceedings of the 9th International Conference on Pattern Recognition, Rome, Italy, 14 May–17 November 1988. 13. Pujari, A.K.; Mitra, C.; Mishra, S. A New Parallel Thinning Algorithm with Stroke Correction for Odia Characters. In Advanced Computing, Proceedings of the Networking and Informatics, 24–26 June, 2014; Kumar Kundu, M., Mohapatra, D., Konar, A., Chakraborty, A., Eds.; Springer, 2019; Volume 1, pp. 413–420. Available online: https://books.google.pl/books?id=qjwqBAAAQBAJ&printsec= frontcover&dq=New+Parallel+Thinning+Algorithm+with+Stroke+Correction+for+Odia+Characters. +In+Advanced+Computing,+proceedings+of+the+Networking+and+Informatics&hl=pl&sa=X& ved=0ahUKEwiwxIWJoqDpAhVNwqYKHQXFBJsQ6wEIQDAC#v=onepage&q=New%20Parallel% 20Thinning%20Algorithm%20with%20Stroke%20Correction%20for%20Odia%20Characters.%20In% 20Advanced%20Computing%2C%20proceedings%20of%20the%20Networking%20and%20Informatics& f=false (accessed on 23 March 2020). 14. ESRI Polygon to Centerline. Available online: https://pro.arcgis.com/en/pro-app/tool-reference/topographic- production/polygon-to-centerline.htm#C_GUID-22398A58-3D55-4193-9C13-9A945C5BD1F0 (accessed on 23 March 2020). ISPRS Int. J. Geo-Inf. 2020, 9, 304 19 of 20

15. Haunert, J.H.; Sester, M. Using the Straight Skeleton for Generalisation in a Multiple Representation Environment. In Proceedings of the 7th ICA Workshop on Generalisation and Multiple Representation, Leicester, UK, 20–21 August 2004. 16. Szombara, S. Comparison of methods used in cartography for the skeletonisation of areal objects. Geoinform. Pol. 2015, 14.[CrossRef] 17. Golly, A.; Turowski, J.M. Deriving principle channel metrics from bank and long-profile geometry with the R-package cmgo. Earth Surf. Dynam. 2017, 5, 557–570. [CrossRef] 18. ET SpatialTechniques. Available online: https://www.ian-ko.com (accessed on 23 March 2020). 19. GRASS. Available online: https://grass.osgeo.org/grass76/manuals/addons/v.centerline.html (accessed on 23 March 2020). 20. FME-Approximate-Centerline-of-Polygon. Available online: https://knowledge.safe.com/questions/92663/ approximate-centerline-of-polygon.html (accessed on 23 March 2020). 21. Python. Available online: https://pypi.org/project/centerline/ (accessed on 23 March 2020). 22. Aurenhammer, F.; Alberts, D.; Gartner, B. A Novel Type of Skeletons or Polygons. J. Univers. Comput. Sci. 1995, 1, 752–761. 23. Felkel, P.; Obdrzalek, S. Straight Skeleton Implementation. In Proceedings of the Conferenceon Computer Graphics, Budmerice, , 23–25 April 1998; pp. 210–218. 24. Huber, S. The Topology of Skeletons and Offsets. In Proceedings of the 34th European Workshop on Computational Geometry, Berlin, , 21–23 March 2018. 25. Biedl, T.; Held, M.; Hubert, S.; Kaaser, D.; Palfrader, P. A simple algorithm for computing positively weighted straight skeletons of monotone polygons. Inf. Process. Lett. 2015, 115, 243–247. [CrossRef][PubMed] 26. Eder, G.; Held, M. Computing positively weighted straight skeletons of simple polygons based on a bisector arrangement. Elsevier Inf. Process. Lett. 2017, 132, 28–32. [CrossRef] 27. Lee, D.T. Medial Axis Transformation of a Planar Shape. IEEE Trans. Pattern Anal. Mach. Intell. 1982, 4, 363–369. [CrossRef] 28. Chin, F.; Snoeyink, J.; Wang, C.A. Finding the Medial Axis of a Simple Polygon in Linear Time. In Proceedings of the 6th International Symposium Algorithms and Computation (ISAAC 95), Cairns, , 4–6 December 1995; pp. 382–391, ISBN 3-540-60573-8. Available online: https://dblp1.uni-trier.de/db/conf/isaac/ isaac95.html (accessed on 23 March 2020). 29. Karimipour, F.; Ghandehari, M.; Ledoux, H. Watershed delineation from the medial axis of river networks. Comput. Geosci. 2013, 59, 132–147. [CrossRef] 30. Joan-Arinyo, R.; Pérez-Vidal, L.; Gargallo-Monllau, E. An adaptive algorithm to compute the medial axis transform of 2-d polygonal domains. In CAD Systems Development Tools and Methods; Roller, D., Brunet, P., Eds.; Springer: Berlin/Heidelberg, Germany, 1997; pp. 283–298. 31. Prinz, F.B.; Cern, J.-H. Geometric Abstractions Using Medial Axis Transformation; Carnegie Mellon University: Pittsburgh, PA, USA, 1988. 32. McAllister, M.; Snoeyink, J. Medial axis generalization of river net-works. Cartogr. Geogr. Inf. Sci. 2000, 27, 129–138. [CrossRef] 33. Giesen, J.; Miklos, B.; Pauly, M. Medial axis approximation of planar shapesfrom union of balls: A simpler and more robust algorithm. In Proceedings of the 19th Annual Canadian Conference on Computational Geometry, Ottawa, ON, , 20–22 August 2007. 34. Smathermather. Available online: https://smathermather.com/2011/09/16/what-is-the-center-line-of-a- polygon-or-how-to-change-labeling-in-geoserver/ (accessed on 23 March 2020). 35. 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. 36. Lu, W.; Tinghua, A. Center Point of Simple Area Feature Based on Triangulation Skeleton Graph. (Short Paper). GIScience 2018, 41:1–41:6. 37. Aigner, W.; Aurenhammer, F.; Jüttler, B. On triangulation axes of polygons. Inf. Process. Lett. 2015, 115, 45–51. [CrossRef] 38. 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. [CrossRef] 39. 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. [CrossRef] ISPRS Int. J. Geo-Inf. 2020, 9, 304 20 of 20

40. 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, , 9–11 September 2011; pp. 125–127. 41. 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. [CrossRef] 42. Li, C.; Yin, Y.; Wu, P.; Wei, W. Skeleton Line Extraction Method in Areas with Dense Junctions Considering Stroke Features. Int. J. Geo-Inf. 2019, 8, 303. [CrossRef] 43. Rajib, A.; Merwade, V. Hydrologic response to future land use change in the Upper Basin by the end of 21st century. Hydrol. Process. 2017, 31, 3645–3661. [CrossRef] 44. Kozioł, K.; Lupa, M.; Krawczyk, A. The Extended Structure of Multi-Resolution Database. In Beyond Databases, Architectures, and Structures, Proceedings of the BDAS 2014. Communications in Computer and Information Science, Ustron, Poland, 27–30 May 2014; Kozielski, S., Mrozek, D., Kasprowski, P., Małysiak-Mrozek, B., Kostrzewa, D., Eds.; Springer: Cham, Switzerland, 2014; Volume 424. 45. Delucai, A.A.; Black, R.T. A Comprehensice Approach to Automatic Feature Generalization. In Proceedings of the 13th International Cartographic Conference, Mich, Mexico, 12–21 October 1987. 46. Penninga, F.; Verbree, E.; Quak, W.; Van Oosterom, P. Construction of the Planar Partition Postal Code Map Based on Cadastral Registration. GeoInformatica 2005, 9, 181–204. [CrossRef] 47. Regulation of the Minister of the Interior of 17 November 2011 on databases of topographic objects, databases of geographic objects, and standard maps (Journal of Laws 2011, poz. 1642)., (in Polish:. Rozporz ˛adzenie ministra spraw wewn˛etrznychi administracji z dnia 17 listopada 2011 r. w sprawie bazy danych obiektów topograficznych oraz bazy danych obiektów ogólnogeograficznych, a tak˙zestandardowych opracowa´n kartograficznych (D.U. z dnia 17 listopada 2011 r). 48. Lewandowicz, E.; Lisowski, P. Methodology to generate navigation models in buildings. J. Civ. Eng. Manag. 2018, 28, 653–663. [CrossRef] 49. Lewandowicz, E.; Lisowski, P.; Flisek, P. A Modified Methodology for Generating Indoor Navigation Models. Int. J. Geo-Inf. 2019, 8, 60. [CrossRef] 50. Chrobak, T. A Numerical Method for Generalizing the Linear Elements of Large-Scale Maps, Based on the Example of Rivers. Cartogr. Cartogr. Int. J. Geogr. Inf. Geovisualization 2006, 37, 49–56. [CrossRef] 51. Nyberg, B. Geometric Attributes Tools. Available online: https://github.com/BjornNyberg/Geometric- Attributes-Toolbox/blob/master/Datasets/README.pdf (accessed on 23 March 2020).

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