A method, system and medium for automatically drawing a river discrete elevation point boundary

CN123015869APending Publication Date: 2026-10-30BUREAU OF HYDROLOGY CHANGJIANG WATER RESOURCES COMMISSION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611144709.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

该算法仅允许形成凸包,导致需要凹型边界绘制细节的部位时无法实现,边界精度达不到要求

Benefits of technology

[0038](1)外边界不出现向内凹陷的毛刺状边界;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015869A_ABST
    Figure CN123015869A_ABST
Patent Text Reader

Abstract

The application discloses a kind of river discrete elevation point boundary automatic drawing method, system and medium, method includes the following steps: according to all discrete points initialization delaunay triangulation is generated;Record the index of each triangle, the point index of three vertices, the index of three edges to triangle table;Record triangle index, the area of triangle, minimum angle angle to triangle feature table;Record the edge index of boundary line segment to boundary table;For each boundary line segment, check whether the triangle where it is is high-quality triangle;Loop execution is checked to each boundary line segment, until all line segments in boundary table are checked, boundary table has no change, at this time, boundary table is the outer boundary of the river discrete elevation point.The application has strong adaptive capacity, automatically adjusts according to topographic map scale, without setting any parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of geographic information systems, specifically to an automatic drawing method, system, and medium for determining the boundaries of discrete elevation points in a river channel. Background Technology

[0002] The boundaries of discrete elevation points in river channels play a crucial role in hydrological calculations, hydrological forecasting, and river channel analysis. They are essential constraints on the scope of these calculations and analyses, and the rationality and accuracy of the boundary drawing directly affect the correctness of the results. Generally, the boundary shape of discrete elevation points varies depending on their intended use. An ideal boundary should accurately and reasonably represent the data within the measurement range, without expanding or reducing the data's influence, thus fully and rationally utilizing the valuable measurement data.

[0003] Discrete elevation points in a river channel have the following characteristics:

[0004] Due to the meandering course and the confluence of tributaries, the river's shape often exhibits U-shaped boundaries.

[0005] The degree of dispersion of discrete elevation points in a river channel depends on the scale used when measuring the river channel.

[0006] Due to limitations in measurement conditions, such as riverbank areas, the sampling points for elevation points are irregular, and the density and spacing of local elevation points may not fully meet the scale requirements. The distance between two adjacent measurement points may be much greater than the average distance.

[0007] Requirements for drawing the outer boundary of the river channel:

[0008] The outer boundary should fit the data as closely as possible.

[0009] A discrete elevation point of a connected river channel has only one outer boundary.

[0010] The outer boundary should be as smooth as possible, without any inward-recessed, burr-like features.

[0011] Existing methods for drawing the boundaries of discrete elevation points in river channels have significant shortcomings, as detailed below:

[0012] 1) Manual drawing: When drawing the boundary of discrete elevation points of artificial waterways, the drawing relies on individual edge drawing, which results in a large degree of randomness in drawing accuracy, inconsistent quality and standards, low work efficiency, high labor costs, and difficulty in meeting daily production needs.

[0013] 2) Convex Hull Algorithm: Based on the Convex Hull algorithm and its improvements, this algorithm is suitable for scenarios that require strict inclusion of all points and allow "convex" boundaries. However, this algorithm only allows the formation of a convex hull, which means it cannot be used to draw details requiring concave boundaries, resulting in insufficient boundary precision.

[0014] 3) Concave hull algorithm: Based on the Alpha Shapes algorithm, it is applicable to various boundary shapes, but the parameter Alpha is difficult to adaptively select. If Alpha is too large, it will lose the details of the concave part (approaching the convex hull), and if it is too small, it will cause the contour to break, produce "tentacles" or fragmented output. Moreover, there is no universal theoretical value, poor robustness to noise and sparse point clouds, and high computational complexity. Summary of the Invention

[0015] The purpose of this invention is to provide an automatic drawing method, system, and medium for discrete elevation point boundaries of river channels, thereby optimizing the accuracy and efficiency of traditional automatic drawing of discrete point boundaries.

[0016] To achieve the above objectives, the present invention provides the following technical solution:

[0017] In a first aspect, embodiments of this application provide an automatic method for drawing the boundary of discrete elevation points in a river channel, comprising the following steps:

[0018] Based on the discrete elevation point information of the river channel, record the elevation point index, X coordinate, Y coordinate, and point elevation to point table, and generate an initialized Delaunay triangulation network based on all discrete points;

[0019] Record the index of each line segment that makes up the side of a triangle, the index of the two endpoints of each line segment into the line segment table, and record the index of each triangle, the index of the three vertices, and the index of the three sides into the triangle table;

[0020] Calculate the area, minimum angle, and longest side length of each triangle based on its coordinates, and record the triangle index, area, and minimum angle in the triangle feature table.

[0021] Find the edge that appears only once in the triangle table, which forms the boundary segment of the initialized Delaunay triangulation. Connect the boundary segments end to end according to the index of the segment table to form a closed boundary in sequence. Record the variable index of the boundary segment in the boundary table in order.

[0022] For each boundary segment, check whether the triangle it belongs to is a high-quality triangle based on the triangle table and triangle feature table. If it is a high-quality triangle, check the next boundary segment; if it is not a high-quality triangle, delete the boundary segment. If the boundary segment is deleted, delete both the segment index and the index of the triangle it belongs to.

[0023] The process of checking each boundary segment is repeated until all segments in the boundary table have been checked and the boundary table remains unchanged. At this point, the boundary table represents the outer boundary of the discrete elevation point of the river channel.

[0024] The adaptive KDE kernel density estimation method is used to count the areas with the densest area of ​​all triangles. The maximum area range corresponding to the half-height and width range of the maximum density is found and denoted as maxArea.

[0025] A triangle is considered a high-quality triangle if it simultaneously satisfies the following conditions:

[0026] Condition 1: The area of ​​a high-quality triangle is no more than twice the size of maxArea;

[0027] Condition 2: The minimum angle of a high-quality triangle is greater than 20°.

[0028] If it is not a high-quality triangle, delete this boundary segment, except in the following five cases:

[0029] Special Case 1: If deleting this edge results in a triangle that does not share sides with any other triangle;

[0030] Special Case 2: If deleting this edge generates a point that does not belong to any triangle;

[0031] Special Case 3: If deleting this boundary generates an edge that does not belong to any triangle;

[0032] Special Case 4: If this boundary is the shortest side of the triangle, and the triangle does not satisfy condition 3 for a high-quality triangle.

[0033] Special Case 5: If this boundary is deleted, the outer boundary cannot be closed.

[0034] Delete the line segments to be deleted one by one. For each line segment, delete the line segment in the boundary table. At the same time, insert the indices of the other two sides of the triangle containing the deleted line segment in the boundary table in order at the deletion position, and delete the triangle containing the line segment.

[0035] Secondly, embodiments of this application provide an automatic drawing system for discrete elevation point boundaries of a river channel, including a memory and a processor. The memory includes a program for an automatic drawing method for discrete elevation point boundaries of a river channel. When the program for the automatic drawing method for discrete elevation point boundaries of a river channel is executed by the processor, it implements the steps described above.

[0036] Thirdly, embodiments of this application provide a computer-readable storage medium storing program code, which, when executed by a processor, implements the steps of an automatic drawing method for discrete elevation point boundaries of a river channel as described above.

[0037] Compared with the prior art, the beneficial effects of the present invention are:

[0038] (1) No inwardly concave, burr-like boundary appears on the outer boundary;

[0039] (2) There should be no isolated points not contained by the outer boundary, and no cases where non-adjacent edges share the same endpoint;

[0040] (3) The outer boundary does not form multiple outer boundaries;

[0041] (4) High computational efficiency, with the main calculation process focusing only on boundary-related points;

[0042] (5) It has strong adaptability and automatically adjusts according to the topographic map scale without the need to set any parameters. Attached Figure Description

[0043] Figure 1 Initialize the Delaunay triangulation network using discrete points for river channel elevation;

[0044] Figure 2 The boundary range of the discrete points of river channel elevation after optimization. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] like Figure 1 As shown, this invention provides a method for automatically drawing the boundary of discrete elevation points in a river channel. In this embodiment, a portion of the discrete elevation data for a certain river section is selected, totaling 48 discrete points. The automatic boundary drawing process includes the following steps:

[0047] Step 1:

[0048] Based on the discrete elevation points of the river channel, record the point information into the "point table," including the point index, X coordinate, Y coordinate, and point elevation. Then, generate an initial Delaunay triangulation network based on all discrete points, containing 75 triangles. (See...) Figure 1 .

[0049] Step Two:

[0050] Based on the triangulation data, record the information of each line segment in the triangulation into the "line table" without repetition, including the line segment index, the index of the first endpoint of the line segment, and the index of the last endpoint of the line segment; record the information of each triangle into the "triangle table", including the triangle index, the index of the first vertex of the triangle, the index of the second vertex of the triangle, and the index of the third vertex of the triangle.

[0051] Step 3:

[0052] The feature information of each triangle is calculated based on the triangle coordinates in the "point table" and recorded in the "feature table". This includes the triangle index, triangle area, and minimum angle. The distribution of the area of ​​all triangles is shown in Table 1.

[0053] Table 1. Distribution of triangle areas

[0054]

[0055] The density distribution of the most dense region of the area value of 75 triangles was statistically analyzed using the adaptive KDE kernel density estimation method. The area range corresponding to the half-height and width range of the maximum density is 24480-25300, and the maximum value is denoted as maxArea=25300.

[0056] Step 4: In the "triangle table", count the number of times the line segment indexes that make up the triangle appear. Find and record the information of the line segments whose indexes appear only once in the "boundary table". The data is shown in Table 2, including the line segment index and the triangle index to which the line segment belongs. According to the line segment endpoint index information in the "line table", arrange the line segments in the "boundary table" in the order of their first and last connections to form a closed boundary arranged in sequence, which forms the initialized discrete elevation point boundary of the river channel.

[0057] Table 2 Initial data for the boundary table

[0058]

[0059] Step 5

[0060] Starting with the first boundary line segment in the "boundary table", and combining the "triangle table" and "feature table", check in sequence whether the triangle containing each line is a "high-quality triangle".

[0061] The maximum area of ​​a high-quality triangle is maxArea×2=25300×2=50600.

[0062] In the first round of checks, triangle T0 containing the first boundary segment L0 is determined. Since it meets the criteria for a high-quality triangle, it is retained. Next, triangle T1 containing the second boundary segment L1 is checked; it violates condition 1 and must be deleted. Similarly, L7, L8, and their corresponding triangles T2 and T3 all violate condition 3 and must be deleted. This completes the first round of checks. In the "boundary table," the record for L2 is deleted, and then L3 and L4, representing the remaining two sides of T1, are inserted sequentially to connect with L0 and L2. The record for L7 is deleted, and then L9 and L10, representing the remaining two sides of T2, are inserted. The record for L8 is deleted, and then L11 and L12, representing the remaining two sides of T2, are inserted. This forms a new boundary loop. The records containing the indices of T1, T2, and T3 are deleted from the "triangle table," and the records containing the indices of T1, T2, and T3 are also deleted from the "feature table."

[0063] After the first round of inspection and processing, the status of the "boundary table" is shown in Table 2:

[0064] Table 3. Boundary table data after the first round of optimization.

[0065]

[0066] After multiple rounds of checks, triangles T4, T5, T6, T7, T8, and T10 do not meet condition 1, and triangles T9, T11, T12, T13, T14, T15, and T16 do not meet condition 2, and should be deleted. Although triangle T17 does not meet condition 3, it meets special case 4, so it will not be deleted.

[0067] Special cases 1, 2, and 3 ensure that no single point, line segment, or triangle is suspended, preventing the boundary from not encompassing all data points. Special case 4 ensures that no small burr-like depressions appear on the boundary, and special case 5 ensures that discrete elevation points are not split into multiple ranges, forming multiple boundaries.

[0068] Step Six

[0069] Repeat step five until the "boundary table" remains unchanged. At this point, the boundary table represents the outer boundary of the discrete elevation points of the river channel. The final outer boundary is shown below. Figure 2 .

[0070] This application provides an automatic drawing system for discrete elevation point boundaries of a river channel, including a memory and a processor. The memory includes a program for an automatic drawing method of discrete elevation point boundaries of a river channel. When the program for the automatic drawing method of discrete elevation point boundaries of a river channel is executed by the processor, it implements the steps described above.

[0071] This application provides a computer-readable storage medium storing program code. When the program code is executed by a processor, it implements the steps of an automatic drawing method for discrete elevation point boundaries of a river channel as described above.

[0072] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0073] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0074] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0075] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0076] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0077] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0078] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0079] Those skilled in the art can implement the present invention in various variations without departing from its scope and spirit. For example, a feature of one embodiment can be used in another embodiment to obtain yet another embodiment. Any modifications, equivalent substitutions, and improvements made within the scope of the present invention's technical concept should be within the scope of the present invention.

Claims

1. A method for automatically drawing the boundaries of discrete elevation points in a river channel, characterized in that, Includes the following steps: Based on the discrete elevation point information of the river channel, record the elevation point index, X coordinate, Y coordinate, and point elevation to point table, and generate an initialized Delaunay triangulation network based on all discrete points; Record the index of each line segment that makes up the side of a triangle, the index of the two endpoints of each line segment into the line segment table, and record the index of each triangle, the index of the three vertices, and the index of the three sides into the triangle table; Calculate the area, minimum angle, and longest side length of each triangle based on its coordinates, and record the triangle index, area, and minimum angle in the triangle feature table. Find the edge that appears only once in the triangle table, which forms the boundary segment of the initialized Delaunay triangulation. Connect the boundary segments end to end according to the index of the segment table to form a closed boundary in sequence. Record the edge index of the boundary segment in the boundary table in order. For each boundary segment, check whether the triangle it belongs to is a high-quality triangle according to the triangle table and triangle feature table. If it is a high-quality triangle, check the next boundary segment; if it is not a high-quality triangle, delete the boundary segment. If the boundary segment is deleted, delete both the segment index and the index of the triangle it belongs to. The process of checking each boundary segment is repeated until all segments in the boundary table have been checked and the boundary table remains unchanged. At this point, the boundary table represents the outer boundary of the discrete elevation point of the river channel.

2. The method for automatically drawing the boundary of discrete elevation points in a river channel according to claim 1, characterized in that, The adaptive KDE kernel density estimation method is used to count the areas with the densest area of ​​all triangles. The maximum area range corresponding to the half-height and width range of the maximum density is found and denoted as maxArea.

3. The method for automatically drawing the boundary of discrete elevation points in a river channel according to claim 2, characterized in that, A triangle is considered a high-quality triangle if it simultaneously satisfies the following conditions: Condition 1: The area of ​​a high-quality triangle is no more than twice the size of maxArea; Condition 2: The minimum angle of a high-quality triangle is greater than 20°.

4. The method for automatically drawing the boundary of discrete elevation points in a river channel according to claim 2, characterized in that, If it is not a high-quality triangle, delete this boundary segment, except in the following five cases: Special Case 1: If deleting this edge results in a triangle that does not share sides with any other triangle; Special Case 2: If deleting this edge generates a point that does not belong to any triangle; Special Case 3: If deleting this boundary generates an edge that does not belong to any triangle; Special Case 4: If this boundary is the shortest side in the triangle, and the triangle does not satisfy condition 3 for a high-quality triangle; Special Case 5: If this boundary is deleted, the outer boundary cannot be closed.

5. The method for automatically drawing the boundary of discrete elevation points in a river channel according to claim 2, characterized in that, Delete the line segments to be deleted one by one. For each line segment, delete the line segment in the boundary table. At the same time, insert the indices of the other two sides of the triangle containing the deleted line segment in the boundary table in order at the deletion position, and delete the triangle containing the line segment.

6. An automatic drawing system for discrete elevation point boundaries of a river channel, characterized in that, The device includes a memory and a processor. The memory includes a program for automatically drawing the boundary of discrete elevation points of a river channel. When the program for automatically drawing the boundary of discrete elevation points of a river channel is executed by the processor, it implements the steps described in any one of claims 1-5.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, which, when executed by a processor, implements the steps of an automatic drawing method for discrete elevation point boundaries of a river channel as described in any one of claims 1-5.