Search

CN-121982244-A - Basin dividing method, device, electronic equipment and computer readable storage medium

CN121982244ACN 121982244 ACN121982244 ACN 121982244ACN-121982244-A

Abstract

The application provides a river basin dividing method, a device, electronic equipment and a computer readable storage medium, wherein the method comprises the steps of generating a preliminary river basin dividing layer comprising a river line graph, a river order, a river basin total outlet and a preset site based on a digital elevation model of a target river basin and the position of the preset site; generating a complete downstream water flow path of a preset station according to a river order, detecting a coincident path, taking a starting point of the coincident path as an intersection point, merging the coincident paths, merging the non-coincident paths to generate a main river network vector image layer, taking the preset station and the intersection point as target points, breaking the main river network line to generate a river segment, determining an upstream-downstream relationship and an actual space length between the target points according to the starting target point, the ending target point, the actual space length and the river order of each river segment, and carrying out river basin division to obtain a sub-river basin vector division image layer containing the upstream-downstream relationship and the actual space length between the target points. The working efficiency is improved by the method.

Inventors

  • LIU LIN
  • ZHAO HAORAN
  • WU JIANMING

Assignees

  • 浙江远算科技有限公司

Dates

Publication Date
20260505
Application Date
20260408

Claims (10)

  1. 1. A watershed partitioning method, comprising: Generating a preliminary river basin dividing layer based on a digital elevation model of a target river basin and the position of a preset station, wherein the preliminary river basin dividing layer comprises a line graph for reflecting intersection information among rivers, a river order, a river basin total outlet and the preset station; For each preset station, generating a complete downstream water flow path from the preset station to the main outlet of the river basin according to the river order of each river, detecting a coincident path between the complete downstream water flow paths, and taking the starting point of each coincident path as a junction point; Merging the coincident paths in all the complete downstream water flow paths, and merging the non-coincident paths to generate a main river network vector layer containing continuous main river network lines; taking the preset site and the intersection point as target points, taking the target points as geometric partition points to interrupt the main river network line, generating a plurality of sections of independent river segments, and recording the initial target points, the final target points and the actual space length of each river segment; Determining an upstream-downstream relationship and an actual space length between target points according to the initial target points, the final target points, the actual space length of each river segment and the river sequence of each river; For each target point, determining an upstream water collecting area of the target point according to the upstream target point of the target point and the actual space length between the upstream target point, and drawing an independent sub-basin outline taking the target point as a basin water outlet to obtain a sub-basin vector division layer containing the upstream-downstream relation and the actual space length between the target points.
  2. 2. The method of claim 1, wherein generating a preliminary basin division map layer based on the digital elevation model of the target basin and the location of the preset site comprises: converting the digital elevation model into a 2000-earth projection coordinate system to obtain a projected digital elevation model; For each grid contained in the projected digital elevation model, calculating the elevation gradient from the grid to a neighborhood grid, selecting the neighborhood grid corresponding to the maximum value of the elevation gradient, and determining the water flow direction of the grid based on the selected neighborhood grid; determining a grid type of each grid according to the water flow direction, the upstream water collecting area and the water collecting area threshold value of each grid so as to obtain each river in the target flow field, wherein the grid type comprises a river grid and a non-river grid; Determining the river order of each river according to the condition of branches converged by each river, wherein the higher the river order is, the closer the river is to the downstream; Determining a river vector image layer of the target river basin based on the water flow direction and the grid type of each grid and the river sequence of each river, wherein the river vector image layer comprises a line graph for reflecting intersection information among the rivers and the river sequence of each river; matching each preset site to the river vector layer according to the position of each preset site in the target stream by a space adsorption algorithm, and marking the matching position of each preset site on a single dot layer; And generating a preliminary river basin dividing layer comprising a line graph of each river, a river order, a river basin total outlet and a preset site based on the river vector layer and the dot diagram layer.
  3. 3. The method of claim 2, wherein converting the digital elevation model to a 2000 earth projection coordinate system results in a projected digital elevation model, comprising: determining a longitude of a center point of the target river basin based on a boundary of the target river basin; Determining a longitude indexing band of the center point according to the longitude of the center point; determining EPSG corresponding to the longitude-index zone where the center point is located according to EPSG corresponding to each longitude-index zone in a 2000 geodetic projection coordinate system, and taking the EPSG as a target EPSG; and converting an original EPSG contained in the digital elevation model into the target EPSG to finish converting the digital elevation model into a projection coordinate system to obtain a digital elevation model under EPSG of a 2000-earth projection coordinate system.
  4. 4. The method according to claim 2, wherein for each grid included in the projected digital elevation model, calculating an elevation gradient from the grid to its neighboring grid, selecting a neighboring grid corresponding to a maximum value of the elevation gradient, and determining a water flow direction of the grid based on the selected neighboring grid, includes: For each grid contained in the projected digital elevation model, the elevation gradient of that grid to its neighborhood grid is calculated by the following formula: Wherein, the Is the elevation of the grid (i, j); elevation of a neighborhood grid that is grid (i, j); The actual spatial distance from grid (i, j) to the neighborhood grid; an elevation gradient from grid (i, j) to the neighborhood grid; Selecting a neighborhood grid corresponding to the maximum value of the elevation gradient as a target neighborhood grid of the grid; and determining the direction of the grid pointing to the target neighborhood grid as the water flow direction of the grid, coding the water flow direction, and taking the coded water flow direction as the final water flow direction of the grid.
  5. 5. The method of claim 2, wherein the matching each preset site to the river vector layer according to the position of each preset site in the target stream by a spatial adsorption algorithm, and marking the matching position of each preset site on a separate dot layer, comprises: Aiming at each preset station, calculating Euclidean distance between the preset station and each continuous point according to longitude and latitude coordinates of the preset station and longitude and latitude coordinates of each continuous point on each river in the river vector layer; And adsorbing the preset site to the position of the continuous point with the minimum Euclidean distance, and marking the position on a single dot pattern layer as a matching position of the preset site.
  6. 6. The method of claim 2, wherein the generating a preliminary river basin division map layer including a line pattern of each river, a river order, a basin total outlet, and a preset site based on the river vector map layer and the dot map layer comprises: Generating a first river region division layer comprising a line graph, a river sequence, a river region total outlet and a preset site of each river based on the river vector layer and the dot diagram layer; Taking each preset site in the first river basin dividing layer as a dividing point, and performing preliminary sub-river basin dividing to obtain a second river basin dividing layer containing line patterns of each river, river orders, total outlets of the river basins, preset sites and outlines of the divided sub-river basins, wherein each sub-river basin in the second river basin dividing layer corresponds to one preset site; Verifying whether the position of a preset site contained in the second flow field division layer is correct or not according to the outline shape characteristics of each sub-flow field in the second flow field division layer, the river corresponding to each sub-flow field, the preset site and the river where each known preset site is located; if the position of the preset site contained in the second domain division layer is correct, the second domain division layer is used as a preliminary domain division layer; If the position of the preset site contained in the second flow field dividing layer is incorrect, directly editing the position of each preset site in the target flow field, and based on the edited position of each preset site in the target flow field, re-executing the step to match each preset site to the river vector layer according to the position of each preset site in the target flow field through a spatial adsorption algorithm, marking the matched position of each preset site on a single dot pattern layer and subsequent steps, or manually adjusting the position of the preset site in the second flow field dividing layer in a GIS interaction environment, recording the corrected position of the preset site, re-executing the step to match each preset site to the river vector layer according to the position of each preset site in the target flow field through a spatial adsorption algorithm, and marking the matched position of each preset site on the single dot pattern layer and subsequent steps.
  7. 7. The method of claim 1, wherein the detecting the coincident paths between the complete downstream water flow paths, taking a starting point of each coincident path as an intersection, comprises: Detecting the coincident paths between the complete downstream water flow paths, and taking the starting point of each coincident path as a first intersection point; Collecting all first intersection points, and performing geometric deduplication treatment on the first intersection points; and comparing the space positions of the first intersection point after the geometric duplication removal treatment with the preset site, and reserving the preset site at the overlapped point, wherein the first intersection point which is not overlapped is used as a final intersection point.
  8. 8. A watershed dividing apparatus, comprising: The system comprises a first generation module, a first generation module and a second generation module, wherein the first generation module is used for generating a preliminary river basin dividing layer based on a digital elevation model of a target river basin and the position of a preset station, and the preliminary river basin dividing layer comprises a line graph for reflecting intersection information among rivers, a river order, a river basin total outlet and the preset station; The second generation module is used for generating a complete downstream water flow path from each preset station to the total outlet of the river basin according to the river sequence of each river, detecting a coincident path between the complete downstream water flow paths and taking the starting point of each coincident path as a junction point; The merging module is used for merging the coincident paths in all the complete downstream water flow paths and merging the non-coincident paths to generate a main river network vector diagram layer containing continuous main river network lines; The breaking module is used for taking the preset site and the intersection point as target points, taking the target points as geometric partition points to break the main river network line, generating a plurality of sections of independent river segments, and recording the initial target points, the final target points and the actual space length of each river segment; The determining module is used for determining the upstream-downstream relation and the actual space length between the target points according to the starting target point, the ending target point, the actual space length of each river segment and the river sequence of each river; The dividing module is used for determining an upstream water collecting area of each target point according to the upstream target point of the target point and the actual space length between the upstream target point and the upstream target point, and drawing out an independent sub-basin outline taking the target point as a basin water outlet to obtain a sub-basin vector dividing layer comprising the upstream and downstream relation between the target points and the actual space length.
  9. 9. An electronic device comprising a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the electronic device is in operation, the machine-readable instructions when executed by the processor performing the steps of the method of any of claims 1 to 7.
  10. 10. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1 to 7.

Description

Basin dividing method, device, electronic equipment and computer readable storage medium Technical Field The present application relates to the field of hydraulic engineering technologies, and in particular, to a method and apparatus for dividing a river basin, an electronic device, and a computer readable storage medium. Background The hydrologic calculation is a core foundation for hydraulic engineering planning, design and safety evaluation, and the accuracy of the hydrologic calculation is directly related to water resource scheduling, flood control, drought resistance and engineering benefit exertion. The accuracy of the sub-watershed division result is directly influenced by the accuracy and reliability of the hydrologic calculation as a key preprocessing step of the hydrologic calculation. Currently, hydrologic sub-watershed partitioning generally relies on specialized software such as GIS (geographic information system) or SWAT (water assessment tool). In the GIS software, a series of operations such as data projection, grid filling, flow direction extraction, river network generation, and sub-drainage basin division need to be sequentially performed, and the operation steps are multiple (i.e., the flow is complex), so that a long time is required. Although the SWAT software simplifies the operation steps to a certain extent, the steps of projection, river network extraction, site setting and the like still need to be completed, and the SWAT software is easy to cause unstable software operation and even abnormal flash back due to the problems of version compatibility and the like, so that the working efficiency is influenced. In addition, the traditional sub-river basin division mode is essentially mechanical division according to preset site positions, wherein the preset site positions are usually control sites such as hydrologic stations (used for monitoring water level flow), reservoir dam sites (positions of reservoir dams), important water intake ports (such as places where water is needed in cities or farmlands), and the like, the mechanical division is only carried out according to given preset site positions (namely control sites), and key hydrologic topological nodes (such as junction points of two control sites along the downstream of a river channel) in the river basin cannot be automatically identified and extracted. This results in poor accuracy of the sub-basin partitioning results. Furthermore, the sub-river basin division result obtained by using the traditional sub-river basin division method can only provide basic spatial relationship (namely, can only divide a block region), and can not directly output complete river network topological relationship (namely, upstream and downstream relationship). This results in the need for engineers to identify the topology of the river network themselves during the subsequent hydrologic calculation, which not only affects the working efficiency, but also easily introduces subjective errors. Disclosure of Invention Accordingly, the present application is directed to a method, an apparatus, an electronic device, and a computer readable storage medium for domain division, which simplify the operation steps of engineers and improve the working efficiency and the accuracy of the division result. In a first aspect, an embodiment of the present application provides a method for dividing a drainage basin, including: Generating a preliminary river basin dividing layer based on a digital elevation model of a target river basin and the positions of preset stations in the target river basin, wherein the preliminary river basin dividing layer comprises line patterns for reflecting intersection information among rivers, a river order of each river, a river basin total outlet and preset stations, and the river order is determined according to the condition of branches converged by the rivers; For each preset station, generating a complete downstream water flow path from the preset station to the main outlet of the river basin according to the river sequence of each river, and detecting a coincident path between the complete downstream water flow paths to take the starting point of each coincident path as a junction point; merging all the coincident paths in the complete downstream water flow paths, and merging the non-coincident paths in the complete downstream water flow paths to generate a main river network vector layer containing integral continuous main river network lines; Taking the preset site and the intersection point as target points, taking the target points as geometric division points, performing breaking operation on the main river network line, generating a plurality of sections of independent river segments, and recording the initial target points, the termination target points and the actual space length of each river segment; Determining the upstream-downstream relation and the actual space length between the target points according to the