An automatic method for extracting streamlines in glaciers
Through the combination of Tyson polygon algorithm and digital elevation model, the accuracy and automation of flowline extraction in glaciers are solved, and the rapid, accurate and automatic extraction of main and tributary lines of glaciers is achieved, which is suitable for large-area glaciers. Streamline study.
Patent Information
- Application Number
- CN202210302373.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-03-25
AI Technical Summary
The prior art is difficult to accurately and automatically extract the mid-flow lines of glaciers on a large regional scale, especially the mid-flow lines of glaciers and branch glaciers with large areas, and requires manual participation and complex parameter settings.
The Tyson polygon algorithm is used to generate the glacier center line as the skeleton line of the glacier area. Combining the digital elevation model and the contour boundary line, the flow lines in the glacier are automatically extracted by screening and connecting the vertices to achieve rapid and accurate extraction of the main and tributary lines of the glacier. .
It realizes rapid, accurate and automatic extraction of flow lines in glaciers, reduces artificial participation, and is suitable for flow lines in glaciers at large regional scales, improving extraction efficiency and accuracy.
Smart Images

Figure CN114677397B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of aerospace, and in particular to a method for automatically extracting streamlines in a glacier. Background Art
[0002] Glaciers are an important component of the cryosphere and are known as "indicators" and "early warning devices" of climate change. The glacier's midstream is one of the key parameters of the glacier's geometric morphology. It is an important morphological parameter for evaluating glacier stability, analyzing ice flow velocity fields, estimating glacier volume changes, and glacier material balance. Accurate extraction of glacier midstreams and effective grasp of glacier dynamic changes are of vital importance. However, conventional extraction methods mostly extract glacier midstreams based on the flow characteristics of glacier surface materials. However, this method is often affected by factors such as temperature and precipitation around the glacier and cannot achieve large-scale, regional-scale midstream extraction. Moreover, the midstream extracted by this method cannot effectively characterize the main stream of the glacier. Therefore, it is particularly important to study and establish an automatic extraction algorithm that can automatically extract glacier midstreams on a large regional scale.
[0003] At present, domestic and foreign scholars have also conducted some research on the automatic extraction method of glacier streamlines. For example, Yang Baiyi et al. used the glacier centerline method and the glacier mainstream line method for extraction. The extraction results of this method are relatively accurate for glaciers with smaller areas, but the extraction of streamlines in the accumulation area (the part above the glacier equilibrium line where the material balance is positive) of glaciers with larger areas is extremely inaccurate, and it is impossible to automatically extract streamlines in glaciers on a large regional scale. Kienholz et al. introduced the cost distance analysis method into the process of extracting streamlines in glaciers, and used the Euclidean distance and the elevation value of the glacier area to constrain the streamlines to improve the accuracy of the extraction results. However, the algorithm has a complex extraction process, requires more parameters for auxiliary extraction, and has a slow extraction speed. Machguth et al. proposed a method for extracting streamlines in glaciers using the slope of the glacier area, but this method has high requirements on the quality of the (digital elevation model) DEM of the glacier area, and requires more manual corrections during the extraction process to achieve better extraction results, and cannot truly achieve large-area automatic extraction.
[0004] At present, most of the research is based on the method of extracting the median streamline of the glacier's central axis. The core content of this method is to extract the median streamline of the glacier within the existing glacier boundary contour in combination with the glacier area DEM (digital elevation model), and finally complete the extraction of the median streamline of the glacier. The specific process is as follows:
[0005] (1) Use the DEM (digital elevation model) data of the glacier area to obtain the highest and lowest points of the glacier boundary and connect them to form an axis. Calculate the elevation values of the boundary points and obtain the highest and lowest points, which are used as the starting and end points of the flow line in the glacier, respectively. Connect the two points to form the glacier axis.
[0006] (2) Generate vertical lines: Generate parallel lines perpendicular to the glacier axis at given intervals.
[0007] (3) Clipping parallel lines: Use the glacier boundary line to clip the parallel lines and retain the parallel lines inside the glacier boundary.
[0008] (4) Find the midpoint of the parallel line segments and calculate the elevation.
[0009] (5) Connect the midpoints. Connect the highest point to its adjacent points according to the altitude value until the lowest point, and obtain the center line of the entire glacier. Summary of the invention
[0010] The purpose of this method is to solve the above problems existing in the prior art.
[0011] To achieve the above-mentioned purpose, the present method provides a method for automatically extracting streamlines in glaciers, the method comprising: obtaining the contour boundary line of the target glacier; judging whether there is an inner contour boundary line in the target area of the target glacier based on the contour boundary line, and processing the target glacier to obtain encrypted boundary line data; obtaining the starting point and end point of the streamline of the target glacier based on the encrypted boundary line data and the digital elevation model of the target glacier, and drawing Thiessen polygons based on the contour boundary line of the target glacier, screening all the vertices of the Thiessen polygons according to the contour boundary line to obtain the target vertices located within the range of the target glacier; screening all the vertices within the starting point range of the streamlines in the target glacier using a first predetermined algorithm to delete redundant target vertices; connecting all the target vertices into a plurality of mutually independent preprocessed line segments, and screening the plurality of preprocessed line segments using a second predetermined algorithm to obtain a target path.
[0012] This method introduces the glacier centerline generated by the Thiessen polygon algorithm as the skeleton line of the glacier area rather than a single glacier central axis. This method can not only quickly extract the midstream line of the main glacier, but also accurately extract the midstream lines of the branch glaciers around the main glacier. In addition, no human intervention is required during the extraction process, and fully automated extraction is realized. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A flow chart of a method of the prior art;
[0014] Figure 2 A flowchart of a method for automatically extracting streamlines in a glacier according to an embodiment of the method;
[0015] Figure 3 This is a flow chart of an embodiment of a method for automatically extracting streamlines in a glacier according to an embodiment of the method;
[0016] Figure 4 A flowchart of a second predetermined algorithm of a method for automatically extracting streamlines in a glacier according to an embodiment of the method;
[0017] Figure 5 This is a flowchart of another second predetermined algorithm of a method for automatically extracting streamlines in a glacier according to an embodiment of the method. DETAILED DESCRIPTION
[0018] The technical solution of the method is further described in detail below through the drawings and embodiments.
[0019] like Figure 1 The flowchart of the prior art method is shown. Most of the research is based on the method of extracting the median streamline of the central axis of the glacier. The core content of this method is to extract the median streamline of the glacier within the existing glacier boundary contour by combining the DEM (digital elevation model) of the glacier area, and finally complete the extraction of the median streamline of the glacier. The specific process is as follows:
[0020] (1) Use the DEM (digital elevation model) data of the glacier area to obtain the highest and lowest points of the glacier boundary and connect them to form an axis. Calculate the elevation values of the boundary points and obtain the highest and lowest points, which are used as the starting and end points of the flow line in the glacier, respectively. Connect the two points to form the glacier axis.
[0021] (2) Generate vertical lines: Generate parallel lines perpendicular to the glacier axis at given intervals.
[0022] (3) Clipping parallel lines: Use the glacier boundary line to clip the parallel lines and retain the parallel lines inside the glacier boundary.
[0023] (4) Find the midpoint of the parallel line segments and calculate the elevation.
[0024] (5) Connect the midpoints. Connect the highest point to its adjacent points according to the altitude value until the lowest point, and obtain the center line of the entire glacier.
[0025] Figure 2 This is a flow chart of a method for automatically extracting streamlines in a glacier according to an embodiment of the present method.
[0026] like Figure 2 As shown, a method for automatically extracting streamlines in a glacier according to an embodiment of the method includes:
[0027] S101: Obtain the contour boundary line of the target glacier.
[0028] In this step, the contour boundary line is first obtained to obtain the specific size of the target glacier. The contour boundary line here may be the outer contour boundary line of the target glacier.
[0029] After obtaining the contour boundary line of the target glacier, the method further includes: judging the size of the target glacier according to the contour boundary line, and judging the size of the target glacier by obtaining the contour boundary line of the target glacier.
[0030] Furthermore, the size of the target glacier is determined by at least one of the following methods:
[0031] If the target glacier is a large glacier, the first interpolation interval is used when drawing the Thiessen polygon. If the target glacier is a small glacier, the second interpolation interval is used when drawing the Thiessen polygon.
[0032] The data object to be encrypted can be further determined based on the determined size of the target glacier, and the determination of the size of the target glacier is performed in at least one of the following ways.
[0033] Specifically, in a method for automatically extracting streamlines in a glacier according to an embodiment of the method, a method of drawing Thiessen polygons is used, and when the target glacier is a large glacier, the algorithm used adopts a first interpolation interval when constructing Thiessen polygons. When the target glacier is a small glacier, the algorithm used adopts a second interpolation interval when constructing Thiessen polygons.
[0034] And the first interpolation interval is greater than the second interpolation interval. Specifically, the first interpolation interval may be a larger interpolation interval, and the second interpolation interval may be a smaller interpolation interval.
[0035] S102: Determine whether there is an inner contour boundary line in the target area of the target glacier based on the contour boundary line, and process the target glacier to obtain encrypted boundary line data.
[0036] By judging whether there is an inner contour boundary line in the target area of the target glacier, that is, judging whether there is a bare rock area in the target area of the target glacier. Since some target glaciers have exposed rocks, in order to ensure that the midstream line of the target glacier does not pass through the exposed rock area, the inner contour boundary line of the target glacier is judged to ensure that the calculated target path does not pass through the bare rock area.
[0037] This can ensure the rationality and accuracy of the final target path.
[0038] Furthermore, in some embodiments of the method, for determining the inner contour line, if the target glacier has no inner contour boundary line, the boundary line is encrypted to obtain encrypted boundary line data.
[0039] That is, it is determined that there is no bare rock area in the target glacier. Therefore, the encrypted boundary line data can be obtained by encrypting the data of the boundary points of the contour boundary line, so as to facilitate subsequent calculations.
[0040] Furthermore, in some other embodiments of the method, if the target glacier has an inner contour boundary line, both the inner contour boundary line and the contour boundary line are encrypted to obtain encrypted boundary line data.
[0041] That is, there is an inner contour boundary line in the target glacier, that is, there is a bare rock area in the target glacier. Therefore, it is necessary to encrypt both the inner contour boundary line and the contour boundary line of the target glacier to obtain encrypted boundary line data, so as to ensure that no data is missed.
[0042] S103: Based on the encrypted boundary line data and the digital elevation model of the target glacier, the starting point and end point of the midstream line of the target glacier are obtained, and the Thiessen polygons are drawn based on the contour boundary line of the target glacier. The vertices of all Thiessen polygons are screened according to the contour boundary line to obtain the target vertices within the range of the target glacier.
[0043] In this step, the Thiessen polygons of the target glacier can be generated through the previously acquired encrypted boundary line data and the digital elevation model of the target glacier, so that all the Thiessen polygon vertices of the target glacier can be obtained. After all the vertices are obtained, they need to be further screened, and what needs to be obtained are the target vertices of all Thiessen polygons within the range of the target glacier.
[0044] Among them, the digital elevation model is DEM, and the digital elevation model will be used uniformly in the following description.
[0045] Since the vertices of the Thiessen polygons outside the target glacier cannot be used to extract the target path of the glacier, by screening the vertices, it is possible to effectively avoid the inclusion of redundant and useless vertices in the calculation, which increases the computational workload and reduces the work efficiency. It can be seen that by screening out redundant vertices, the extraction efficiency of this method is improved.
[0046] In the previous article, the starting point and end point were obtained. The digital elevation model of the target glacier can be used to obtain the elevation value of the encrypted boundary line data. According to the elevation value, the local maximum point and the overall maximum point of the target area are obtained as the starting point and end point of the midstream line of the target glacier.
[0047] Specifically, the digital elevation model is used to calculate the elevation value of the encrypted boundary line data, which is the height of the target glacier. Then, the global maximum point and local maximum point of the target area of the target glacier are obtained according to the elevation value.
[0048] That is, based on the elevation data, the overall highest and lowest values of the target glacier and the local highest value of the target glacier, i.e., the local maximum point, are obtained. Then, the difference between the overall maximum point and all the local maximum points are compared to obtain more accurate data on the local maximum points.
[0049] Furthermore, it is determined whether all Thiessen polygon vertices are within the contour boundary of the target glacier, and the vertices within the range are retained as target vertices, and the remaining vertices are deleted.
[0050] It should be noted that Thiessen polygons are polygons composed of perpendicular bisectors of a figure. There is only one discrete point in the polygon, and the distance between the point in the Thiessen polygon and the corresponding discrete point is the shortest. At the same time, the distance between the point on the Thiessen polygon and the discrete points on both sides is equal. Based on this feature, Thiessen polygons have become one of the important research contents in the field of computer geometry and have been applied in different disciplines.
[0051] One of the applications of the Thiessen polygon algorithm is to generate the skeleton of a figure and use it as an abstract representation of the figure. This method takes advantage of the characteristics of Thiessen polygons, extracts the boundary points of the figure as discrete points to construct Thiessen polygons, and clips the generated Thiessen polygons to retain only the internal edges of the figure, thus obtaining the skeleton of the figure, i.e., the center line of the polygon. In two dimensions, as the number of sampling points on the boundary increases, the lines connecting the vertices of the Thiessen polygons inside the figure converge more closely to the center line of the figure.
[0052] S104: All target vertices within the starting point range of the streamlines in all target glaciers are screened using a first predetermined algorithm to delete redundant target vertices.
[0053] In this step, there may be multiple target glaciers, and the starting points of the midstream lines of all target glaciers are obtained and processed simultaneously, thereby improving the extraction efficiency of the midstream lines of the target glaciers.
[0054] All target vertices within the starting point of the midstream line of the target glacier are screened using the first predetermined algorithm, thereby removing redundant target vertices, which can improve work efficiency and avoid the influence of redundant vertices on the results. At the same time, deleting redundant target vertices can effectively avoid the multi-endpoint problem of the midstream line.
[0055] Furthermore, it is determined whether all vertices within the starting point range of the midstream line of the target glacier have branch endpoints, and all vertices are screened by a first predetermined algorithm to obtain the target vertex. Thus, by deleting redundant vertices, branch endpoints can be effectively avoided.
[0056] Furthermore, in order to avoid the problem of branch endpoints in the calculation process mentioned above, in the method of the present method embodiment, the first predetermined algorithm uses the minimum linear distance method for calculation and screening. The calculation method for screening out branch endpoints is performed according to the following formula, which is as follows:
[0057] Where r is the minimum linear distance, S is the area of the target glacier, q1 and q2 are parameters, and r max The maximum limit distance.
[0058] Specifically, in the above formula, S is the area of the target glacier, and its unit is m 2 , and q1 and q2 are parameters. The parameters in the above formula can be obtained by referring to the table below.
[0059] symbol value unit <![CDATA[q1]]> <![CDATA[2*10 -6 ]]> <![CDATA[m -1 ]]> <![CDATA[q2]]> 500 m <![CDATA[r max ]]> 1000 m
[0060] It can be seen from the table that the specific values and units of the parameters appearing in the formula have been given, and those skilled in the art can calculate the minimum linear distance through the above table and formula.
[0061] It should be noted that if there are multiple endpoints in the range r, the above method using the minimum linear distance only retains the point with the highest elevation and deletes the remaining points. At the same time, the above method of minimum linear distance limits the value range of r to 500-1000 meters.
[0062] S105: Connect all target vertices into a plurality of mutually independent pre-processed line segments, and screen the plurality of pre-processed line segments through a second predetermined algorithm to obtain a target path.
[0063] In this step, all the filtered target vertices are connected into independent line segments. The line segments at this time are pre-processed line segments, that is, they still need to be calculated by subsequent algorithms to obtain the target path.
[0064] Below Figure 3 As an embodiment, the above steps are described.
[0065] At the beginning, the outer contour data of the target glacier is obtained, and the size of the target glacier is determined based on the outer contour data, that is, whether the target glacier is a large glacier or a small glacier, so that different interpolation intervals can be used for the target glacier in the future.
[0066] Specifically, if the target glacier is a large glacier, a larger difference interval is used, and if the target glacier is a small glacier, a smaller difference interval is used, thereby effectively improving the efficiency of the calculation.
[0067] like Figure 3As shown in the figure, after determining the size of the target glacier, determine whether there is a bare rock area in the target glacier, that is, whether there is an inner contour line. If there is an inner contour boundary line, both the inner contour boundary line and the boundary points of the contour boundary line are encrypted. If there is no inner contour boundary line, only the boundary points of the contour boundary line are encrypted.
[0068] At the same time, the digital elevation model is used to obtain the local maximum and maximum points of the target glacier. According to the encrypted boundary line data, the Thiessen polygon is drawn for the target glacier.
[0069] After drawing the Thiessen polygons, delete the Thiessen polygon vertices outside the glacier range and determine whether there are any extra branch endpoints. If not, calculate the target path, i.e., the midstream of the target glacier, using the shortest path algorithm. If there are extra branch endpoints, screen them according to the principle of minimum linear distance and calculate the shortest path to obtain the midstream of the target glacier.
[0070] In some embodiments of the method, Figure 4 As shown, the second predetermined algorithm for screening the target path is implemented by the following method.
[0071] S100: Obtain the paths of all pre-processed line segments, the starting points of all target glaciers, all nodes passed under the starting points and all processed nodes, and establish a first array, a second array, a third array and a fourth array to initialize all arrays.
[0072] In some embodiments of the method, the second predetermined algorithm may use the Dijkstras algorithm. For ease of description, the following description takes the Dijkstras algorithm as an example. The Dijkstras algorithm can find the line segment with the lowest cost between the two end points as the final target result. In other words, the second predetermined algorithm of the embodiment of the method can obtain the pre-processed line segment with the lowest cost between the two target vertices as the final target path, that is, the midstream line to be extracted from the target glacier.
[0073] In this step, all the pre-processed line segments that have been obtained, the starting points of all target glaciers, the nodes that all the starting points pass through, and all the processed nodes are obtained. For the processed line segments under the starting point, the first array can be used for storage, for the starting points of all target glaciers, the second array can be used for storage, for the nodes that all the starting points pass through, the third array can be used for storage, and for the processed nodes under the starting point, the fourth array can be used for storage. Separate storage can facilitate later data search and screening.
[0074] In an embodiment of the method, the first array may use the seen_path array, the second array may use the start array, the third array may use the nodes array, and the fourth array may use the visited array.
[0075] After completing the data initialization, the above array can be initialized.
[0076] S200: Extracting a starting point based on the second array and saving it in a fourth array, while traversing all neighboring nodes of the starting point.
[0077] In this step, the starting point extracted from the second array can be saved in the fourth array, and the neighbor nodes of all the starting points can be traversed. The traversal can enable the algorithm system to obtain the number of all neighbor nodes, which is convenient for subsequent search and processing.
[0078] S300: Acquire a first neighbor node among neighbor nodes to the starting point, save the first neighbor node in a fourth array, and save a path from the first neighbor node to the starting point in the first array.
[0079] In this step, the number of all neighbor nodes reaching a certain starting point is obtained, and then the path information of all neighbor nodes of the starting point reaching the starting point is obtained.
[0080] All paths may be screened through the path information of all neighbor nodes reaching the starting point, so as to screen out the first neighbor node, and the first neighbor node may be the neighbor node with the minimum cost to reach the starting point.
[0081] That is to say, extract the starting point from the start array and save it in the visited array, and find all the neighbor nodes of the starting node and traverse them. If the cost from the current node to a neighbor node is the smallest, save the node in the visited array, and query the path from the current node to the node and save it in the seen_path array.
[0082] S400: Repeat the above steps with the first neighbor node as the starting point until the end point of the midstream line of the target glacier.
[0083] In this step, the above steps are repeated for the first neighbor node until all nodes are completed and the end point of the midstream line reaching the target glacier is obtained, ensuring that all nodes are processed without omission.
[0084] S500: traverse all starting points, and encapsulate the coordinates of all starting points in the array and all nodes in the corresponding fourth array into polyline objects respectively and save the output to obtain all target paths in the target glacier.
[0085] In this step, the coordinates of the data of all the starting points in the array and the shortest path nodes associated with the starting points are encapsulated, saved and output as a polyline object, so as to obtain the target path of the target glacier.
[0086] Furthermore, in this embodiment, the data of a midstream line of the target glacier can be obtained through the above algorithm, and then all the midstream line data of all target paths, that is, glaciers, can be obtained by repeating all the above steps.
[0087] Therefore, the method can quickly obtain all the midstream stream data of the target glacier, which is convenient and fast, and improves work efficiency. At the same time, through the second predetermined algorithm, automatic extraction can be achieved, which is convenient and fast, and reduces the intensity of manual work.
[0088] Specifically, the following is an example description of this embodiment.
[0089] First, obtain n vertices within the starting point of the midstream of the target glacier. Obtain information about n vertices within the starting point of the midstream. That is, obtain the coordinate information of n vertices within the starting point of the midstream, which is convenient for subsequent calculation of the path length of the target path. Then obtain vertex information within the end point of the midstream of the target glacier.
[0090] According to the n vertices obtained, the i-th vertex is obtained from the n vertices obtained, all distances between the i-th vertex and all its neighboring nodes are calculated by a second predetermined algorithm, the distances of all neighboring nodes are compared to select the first neighboring node, and the above steps are repeated with the first neighboring node as the starting point until the end point of the midstream line of the target glacier.
[0091] That is, the distance from the i-th vertex to all neighbor nodes is calculated through the second predetermined algorithm, and then compared. The neighbor node with the closest distance to the i-th vertex and the lowest cost, that is, the first neighbor node, is used as the new starting point, and the above steps are repeated until the end point is reached, thereby completing the screening of the midstream path and screening out the optimal route. It is convenient and fast, and multiple target glaciers can be screened at the same time to improve work efficiency.
[0092] Finally, the path from the starting vertex through the node to the end point is taken as the target path.
[0093] As can be seen from the previous text, taking all vertices as the starting point, the path from all target nodes to the end point is the target path of the midstream line required after screening, and the target path needs to pass through the node, that is, the path from the starting point through the node to the end point is finally determined as the midstream line path of the target glacier, that is, the target path. Therefore, the target path of the target glacier can be calculated conveniently and quickly.
[0094] In some embodiments of the method, the target path, i.e., the algorithm for the midstream line, can also be obtained in the following manner:
[0095] Get all vertices within the starting point and end point of the midstream line of the target glacier, and get the shortest path distance between any two vertices within the two ranges.
[0096] In this step, all vertex information in the target glacier can be obtained. Through the information between two vertices, the distance between the two vertices can be quickly obtained.
[0097] In this embodiment, the second predetermined algorithm may use the Floyd-Warshall algorithm, which is a classic dynamic programming algorithm, and its basic idea is: a shortest path calculation method from any node i to any node j.
[0098] For example, two vertices in the target glacier, namely point i and point j, can be obtained, and the midstream line to be obtained, namely the target path, can be obtained directly from point i to point j, which is convenient and fast.
[0099] In some further embodiments of the method, Figure 5 As shown, the second predetermined algorithm may use the Floyd-Warshall algorithm, which is a classic dynamic programming algorithm, and its basic idea is: the shortest path calculation method from any node i to any node j.
[0100] Specifically, S10: obtaining n vertices of the target glacier.
[0101] In this step, all vertex information is obtained, that is, the coordinate information of all vertices can be obtained, which is convenient for the subsequent calculation of the path length of the target line segment.
[0102] S20: Obtain the coordinates of the i-th vertex, the k-th vertex, and the j-th vertex among the n vertices.
[0103] In this step, the coordinates of some vertices among all the vertices are obtained, that is, the coordinates of the ith vertex, the kth vertex and the jth vertex. It can be understood that the coordinates of all the above ith vertex, the kth vertex and the jth vertex can represent some vertices among all the vertices.
[0104] S30: Calculate the path distance between the i-th vertex and the j-th vertex by using a second predetermined algorithm to obtain a first path distance.
[0105] In this step, the distance between the i-th vertex and the j-th vertex is calculated by using the coordinates of the two vertices. For ease of description, the distance between the i-th vertex and the j-th vertex is defined as the first path distance, which can be expressed as Dis(i, j).
[0106] S40: Calculate the second path distance between the i-th vertex and the k-th vertex and the third path distance between the k-th vertex and the j-th vertex respectively by using a second predetermined algorithm.
[0107] In this step, the second path distance between the i-th vertex and the k-th vertex is first calculated, which can be expressed as Dis(i, k), and then the distance between the k-th vertex and the j-th vertex is calculated, that is, the third path distance, which can be expressed as Dis(k, j).
[0108] S50: Determine the magnitude of the sum of the second path distance and the third path distance and the first path distance to obtain a target path between the i-th vertex and the j-th vertex.
[0109] In this step, the sum of the path distances of Dis(i, k)+Dis(k, j) can be compared with the distance of Dis (i, j), which can be understood as: whether Dis(i, k)+Dis(k, j) is less than Dis (i, j).
[0110] If the sum of the second path distance and the third path distance is less than the first path distance, then the target path from the i-th vertex to the j-th vertex is the sum of the second path distance and the third path distance;
[0111] If the sum of the second path distance and the third path distance is greater than the first path distance, the target path from the i-th vertex to the j-th vertex is the first path distance.
[0112] In other words, if the sum of Dis(i, k) + Dis(k, j) is less than Dis(i, j), it means that the distance from the i-th vertex directly to the j-th vertex is larger, while the distance from the i-th vertex to the k-th vertex and then from the k-th vertex to the j-th vertex is smaller, that is, from i to k and then to j is the path with the lowest cost, which is the target line segment to be obtained, that is, the midstream line. In this way, the midstream line path with the lowest cost can be obtained, which is convenient and fast.
[0113] As can be seen from the previous text, the path that takes all vertices as the starting point and passes through all corresponding target nodes to reach the end point is the target path of the midstream line required after screening, that is, the target path of the target glacier can be calculated conveniently and quickly.
[0114] According to a method for automatically extracting streamlines in glaciers according to an embodiment of the method, in the field of graphics processing, by establishing Thiessen polygons, the characteristics of Thiessen polygons are utilized to realize automatic extraction by extracting a graphics skeleton as the streamline of the target glacier. The method for extracting the streamline of the target glacier based on Thiessen polygons is based on the main skeleton of the contour boundary line of the target glacier, which is used as the basic line selection to further extract the streamline. Compared with the method for extracting the streamline based on the central axis of the target glacier, in the extraction of the streamline of a glacier group with complex contour boundary lines at a regional scale, the streamline of most target glaciers in the glacier group of the target glacier can be extracted to a greater extent. It is not just a single extraction of the streamline of the main glacier, but also has a good extraction effect on the streamline of the branch glacier. The method for automatically extracting streamlines in glaciers according to the embodiment of the method can achieve large regional scale, full coverage and automatic extraction.
[0115] The above specific implementation methods further explain the purpose, technical solutions and beneficial effects of the present method in detail. It should be understood that the above are only specific implementation methods of the present method and are not intended to limit the protection scope of the present method. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present method should be included in the protection scope of the present method.
Claims
1. A method for automatically extracting streamlines in glaciers, characterized in that ,include: Obtain the contour boundary line of the target glacier; Based on the contour boundary line, determining whether there is an inner contour boundary line in the target area of the target glacier, and processing the target glacier to obtain encrypted boundary line data; Based on the encrypted boundary line data and the digital elevation model of the target glacier, the starting point and the end point of the midstream line of the target glacier are obtained, and based on the contour boundary line of the target glacier, Thiessen polygons are drawn, and all the vertices of the Thiessen polygons are screened according to the contour boundary line to obtain the target vertices located within the range of the target glacier, including: judging whether all the vertices of the Thiessen polygons are within the range of the contour boundary line of the target glacier, retaining the vertices within the range as the target vertices, and deleting the remaining vertices; All the target vertices within the starting range of the streamlines in the target glacier are screened using a first predetermined algorithm to delete redundant target vertices, including: determining whether all the vertices within the starting range of the streamlines in the target glacier have branch endpoints, and screening all the vertices using the first predetermined algorithm to obtain the target vertex; wherein the first predetermined algorithm is the minimum linear distance method, and the calculation formula is as follows: , where r is the minimum linear distance, S is the glacier area, q1 and q2 are parameters, and r max The maximum limit distance All the target vertices are connected into a plurality of mutually independent pre-processed line segments, and the plurality of pre-processed line segments are screened by a second predetermined algorithm to obtain a target path.
2. The method according to claim 1, characterized in that: The method of obtaining the starting point and the end point of the midstream line of the target glacier based on the encrypted boundary line data and the digital elevation model of the target glacier includes: Acquiring the elevation value of the encrypted boundary line data using the digital elevation model of the target glacier; The local maximum point and the overall maximum point of the target area are obtained according to the elevation value as the starting point and the end point of the midstream line of the target glacier.
3. The method according to claim 1, characterized in that After obtaining the contour boundary line of the target glacier, the method includes: The size of the target glacier is determined according to the contour boundary line, and at least one of the following methods is used: If the target glacier is a large glacier, a first interpolation interval is used when drawing the Thiessen polygon; If the target glacier is a small glacier, the second interpolation interval is used when drawing the Thiessen polygon. The first interpolation interval is greater than the second interpolation interval.
4. The method according to claim 1, characterized in that The processing of the target glacier to obtain encrypted boundary line data is performed in at least one of the following ways: If the target glacier does not have the inner contour boundary line, encrypting the boundary line to obtain encrypted boundary line data; If the target glacier has the inner contour boundary line, both the inner contour boundary line and the contour boundary line are encrypted to obtain the encrypted boundary line data.
5. The method according to claim 1, characterized in that The step of screening the plurality of pre-processed line segments by a second predetermined algorithm to obtain a target path comprises: Obtaining the paths of all the pre-processed line segments, the starting points of all the target glaciers, all the nodes passed under the starting points and all the processed nodes, and establishing a first array, a second array, a third array and a fourth array to initialize all the arrays; Extract the starting point based on the second array and save it in a fourth array, and traverse all neighboring nodes of the starting point at the same time; Acquire a first neighbor node among all the neighbor nodes to the starting point, save the first neighbor node into a fourth array, and save the path from the first neighbor node to the starting point into the first array; Taking the first neighbor node as the starting point, repeat the above steps until the end point of the midstream line of the target glacier; All the starting points are traversed, and the coordinates of all the starting points in the array and all the corresponding nodes in the fourth array are respectively encapsulated as polyline objects and the output is saved to obtain all the target paths in the target glacier.
6. The method according to claim 1, characterized in that The step of screening the plurality of pre-processed line segments by the second predetermined algorithm to obtain a target path includes: All the vertices within the range of the starting point and the end point of the midstream line of the target glacier are obtained, and the shortest path distance between any two vertices within the two ranges is respectively obtained.
7. The method according to claim 1, characterized in that The step of screening the plurality of pre-processed line segments by the second predetermined algorithm to obtain a target path includes: Obtaining n vertices of the target glacier; Obtaining the coordinates of the i-th vertex, the k-th vertex, and the j-th vertex among the n vertices; Calculating the path distance between the i-th vertex and the j-th vertex by the second predetermined algorithm to obtain a first path distance; respectively calculating the second path distance between the i-th vertex and the k-th vertex and the third path distance between the k-th vertex and the j-th vertex by using the second predetermined algorithm; The sum of the second path distance and the third path distance and the first path distance is determined to obtain the target path between the i-th vertex and the j-th vertex.
