A surface water resource quantity calculation method based on runoff depth contour optimization
By converting runoff depth contour lines into an irregular triangular network model and combining it with raster data processing, and then correcting it with measured data from hydrological stations, the problems of low efficiency and insufficient accuracy in traditional methods are solved, and efficient and automated surface water resource calculation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 青海省水文水资源测报中心
- Filing Date
- 2025-02-18
- Publication Date
- 2026-06-05
AI Technical Summary
Traditional methods for calculating surface water resources are inefficient, prone to errors, heavily influenced by individual subjective experience, and have significant deviations when contour lines are sparse, failing to accurately reflect the high and low values of regional runoff.
A method based on runoff depth contour optimization is adopted to convert the runoff depth contour vector map into an irregular triangular network surface data model, convert it into raster data through linear interpolation, and combine it with measured data from hydrological stations to correct the runoff depth. The contour lines are optimized using bilinear interpolation to achieve automated and visualized calculations.
It has achieved high-precision and high-efficiency automated calculation of surface water resources, which has improved work efficiency and data accuracy, and reduced errors caused by human intervention.
Smart Images

Figure CN120123442B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of hydrology and water resources technology, and in particular to a method for calculating surface water resources based on runoff depth contour optimization. Background Technology
[0002] For many years, the water resources department of Qinghai Province has relied on traditional hydrological theories that assume spatial uniformity in water resource statistics. This approach treats the entire watershed as a whole, neglecting the uneven spatial distribution of meteorological and underlying surface conditions. It mechanically draws isolines that conform to medium to large regional scales, failing to clearly depict the runoff distribution characteristics of small watersheds without available data. Therefore, it lacks an intuitive understanding of details such as high and low runoff values in the region. In calculating water resource quantity, the traditional isoline method is used. This method divides the target unit into isolines of runoff depth, manually assigns values to each unit, and then accumulates the results to calculate the water resource quantity within the target unit, such as (XX watershed or XX administrative region).
[0003] Due to the special nature of the water conservancy industry, the calculation of surface water resources needs to take into account the overlap between water resource areas and administrative regions. Therefore, this method requires manual assignment of values to a large number of calculation units, which is not only inefficient and prone to errors, but also greatly affected by factors such as personal subjective experience. When the density of contour lines is sparse, the results of each statistical analysis will be slightly off, requiring repeated manual correction and fixation. This is detrimental to the actual work of water resources statistics in the water conservancy industry every year.
[0004] In recent years, with the rapid development of computer technology and geographic information systems (ARCGIS), GIS technology has been widely used in various fields. The application of GIS can provide solutions more intuitively and efficiently. In particular, its powerful raster calculation and processing function, combined with the existing hydrological theoretical foundation, makes it possible to quickly, accurately, and consistently measure and count the amount of surface water resources, thus facilitating traditional water conservancy work. Summary of the Invention
[0005] This invention addresses the shortcomings of existing technologies by proposing a method for calculating surface water resources based on runoff depth contour lines. This invention enables high-precision, high-efficiency, and automated calculation of surface water resources.
[0006] The surface water resource calculation method based on runoff depth contour optimization proposed in this invention includes the following steps:
[0007] S101. Convert the target area runoff depth contour vector map into an irregular triangular mesh surface data model, where each node contains a runoff depth value;
[0008] S102. Convert the irregular triangular mesh surface data model into raster data using the linear interpolation method, and assign the runoff depth obtained by linear interpolation to the corresponding raster cell of the raster data.
[0009] S103. The raster data is cropped according to the control boundary of the hydrological station to obtain several watershed raster sets. Each watershed raster set contains all the raster cells of the corresponding watershed. For each watershed raster set, the average pixel value of all raster cells in the watershed raster set is taken as the mean runoff depth of the corresponding watershed raster set. The mean runoff depth of the watershed raster set is compared with the measured natural runoff depth of the watershed at the hydrological station to determine the runoff depth correction coefficient. C i :
[0010] C i =Rh i / Rm i
[0011] In the formula, C i Indicates the first i Runoff depth correction factor for each watershed Rh i Indicates the first i The measured natural runoff depth of the watershed at the hydrological stations in each watershed was determined. Rm i Indicates the first i The mean runoff depth of each watershed grid set; for watersheds without hydrological station control areas, the runoff depth correction factor is taken as 1. i =1,2,…, n , n The total number of river basins;
[0012] S104. Correct the runoff depth of all grid cells in each watershed, specifically as follows: For the first... i All grid cells within a watershed, the runoff depth of each grid cell multiplied by the [number]th [unit]. i Runoff correction coefficient for each watershed C i Complete the runoff depth correction for the watershed raster cell and obtain the corrected and updated watershed raster object;
[0013] S105. Mosaic the above-modified and updated watershed raster objects to obtain a complete raster dataset. The complete raster dataset contains all watershed raster objects in the target area.
[0014] S106. Overlay and segment the administrative division vector map and the watershed vector map to obtain several administrative watershed target units, and then calculate the surface water resources within each administrative watershed target unit. Wrj :
[0015] Wr j =Rd j ×F j
[0016] middle, Wr j Indicates the first j Surface water resources of each administrative river basin target unit Rd j Indicates the first j Runoff depth of each administrative watershed target unit F j Indicates the first j The area of the corresponding region of each administrative river basin target unit j =1,2,…, N , N Indicates the number of target units in the administrative river basin;
[0017] S107. Sum the surface water resources of the target units within the designated watershed to obtain the surface water resources of the designated watershed; sum the surface water resources of the target units within the designated administrative division to obtain the surface water resources of the designated administrative division.
[0018] Furthermore, in step S104, the watershed raster set obtained in step S103 is stored in the form of a raster list, and the watershed raster set as a raster object and the runoff depth correction coefficient in step S103 are respectively listed as one-dimensional arrays for correction calculation:
[0019] A =[ raster 1, raster 2, ..., raster n ]
[0020] B=[ C 1, C 2, ..., C n ]
[0021] D = A × B= [ D 1 , D 2 ,..., D n ]
[0022] In the formula, A Represented by watershed raster set raster i A one-dimensional array of objects, a watershed raster set raster i It contains several grid cells, and the cell value of each grid cell is the runoff depth obtained by linear interpolation in step S102; B Represents the runoff depth correction factor C i A one-dimensional array, D This indicates the corrected and updated watershed raster object. D i A one-dimensional array.
[0023] Furthermore, after step S105 is completed, bilinear interpolation is used to perform linear interpolation on the complete raster dataset to obtain an updated runoff depth contour vector map. Then, step S101 is executed using the updated runoff depth contour vector map to continue the runoff depth correction of the raster data.
[0024] Furthermore, this invention also claims a method for optimizing runoff depth contour lines, characterized by comprising the following steps:
[0025] S201. Convert the target area runoff depth contour vector map into an irregular triangular mesh surface data model, where each node contains a runoff depth value;
[0026] S202. Convert the irregular triangular mesh surface data model into raster data using the linear interpolation method, and assign the runoff depth obtained by linear interpolation to the corresponding raster cell of the raster data.
[0027] S203. The raster data is cropped according to the control boundary of the hydrological station to obtain several watershed raster sets. Each watershed raster set contains all the raster cells of the corresponding watershed. For each watershed raster set, the average pixel value of all raster cells in the watershed raster set is taken as the mean runoff depth of the corresponding watershed raster set. The mean runoff depth of the watershed raster set is compared with the measured natural runoff depth of the watershed at the hydrological station to determine the runoff depth correction coefficient. C i :
[0028] C i =Rh i / Rm i
[0029] In the formula, C i Indicates the first i Runoff depth correction factor for each watershed Rh i Indicates the first iThe measured natural runoff depth of the watershed at the hydrological stations in each watershed was determined. Rm i Indicates the first i The mean runoff depth of each watershed grid set; for watersheds without hydrological station control areas, the runoff depth correction factor is taken as 1. i =1,2,…, n , n The total number of river basins;
[0030] S204. Correct the runoff depth of all grid cells in each watershed, specifically as follows: For the first... i All grid cells within a watershed, the runoff depth of each grid cell multiplied by the [number]th [unit]. i Runoff depth correction factor for each watershed C i Complete the runoff depth correction for the watershed raster cell and obtain the corrected and updated watershed raster object;
[0031] S205. Mosaic the above-modified and updated watershed raster objects to obtain a complete raster dataset. The complete raster dataset contains all watershed raster objects in the target area.
[0032] S206. Use bilinear interpolation to perform linear interpolation on the complete raster dataset to obtain an updated runoff depth contour vector map. Then, use the updated runoff depth contour vector map to execute step S201 and continue to correct the runoff depth of the raster data until the production needs are met.
[0033] S207. Output the corrected runoff depth contour vector map.
[0034] This invention utilizes established runoff depth contour vector data to construct a raster data layer with raster attributes. By monitoring and restoring natural runoff data from hydrological control stations, and through mathematical and logical operations involving the raster layers, the accuracy of the target raster layer is controlled to meet hydrological specifications, achieving a match between raster accuracy and measured data. This transforms traditional methods of calculating surface water resources, integrating traditional water resource calculations and statistics with modern computer technology and geographic information platforms. The data is then applied to practical production work in a visualized manner (or tabular form), achieving automation and improving work efficiency and data accuracy.
[0035] According to the method provided by the present invention, a control program was designed and written using the Python language, and a practical tool for running in a GIS environment was encapsulated, realizing the visualization and automation of surface water resource quantity calculation, and significantly improving the efficiency of surface water resource quantity statistics work.
[0036] The method provided by this invention performs raster processing on isosurfaces and combines it with measured hydrological data from the control basin. Through raster calculation, it controls the accuracy of the data to meet the requirements of practical applications. This method overcomes the shortcomings of traditional manual assignment of values to water resource calculation units, which results in low accuracy, inconsistency, and low efficiency in calculating water resource quantities. Furthermore, it elevates traditional tabular calculations to visual calculations.
[0037] Compared with existing technologies, the advantages of the surface water resource calculation method based on runoff depth contour optimization provided by this invention and its application are as follows:
[0038] (1) High precision and high efficiency.
[0039] (2) It can achieve automation and improve work efficiency.
[0040] (3) Visualization of results. Attached Figure Description
[0041] Figure 1 This is a flowchart of the method in Example 1.
[0042] Figure 2 This is a schematic diagram of the linear interpolation method for converting an irregular triangular mesh into a raster.
[0043] Figure 3 This is a diagram illustrating the principle of raster data correction.
[0044] Figure 4 This is a schematic diagram of bilinear interpolation.
[0045] Figure 5 This is a raster statistical description of the image.
[0046] Figure 6 This is a schematic representation of water resource quantity statistics using the method in Example 1.
[0047] Figure 7 This is a flowchart of the method in Example 2. Detailed Implementation
[0048] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby providing a clearer and more explicit definition of the scope of protection of the present invention. Example
[0049] The data in this embodiment includes: a runoff depth contour vector line layer (the attribute table contains a runoff depth field) and a hydrological monitoring station control basin vector surface layer (the attribute table contains a natural runoff depth field above the hydrological monitoring section of the hydrological station).
[0050] like Figure 1The diagram shown is a flowchart of a surface water resource calculation method based on runoff depth contour lines according to an embodiment of the present invention. The method in this embodiment includes the following steps:
[0051] S101. Convert the target area runoff depth contour vector map into an irregular triangular mesh surface data model (TIN), where each node contains a runoff depth value.
[0052] Triangular Irregular Networks (TINs) are a form of vector-based digital geographic data used to represent surface morphology. Because nodes can be placed irregularly on the surface, TINs offer higher resolution in areas with significant surface undulations or requiring more detail, while lower resolution is suitable for areas with lower surface undulations, preventing data redundancy. This aligns with the detailed representation of runoff depth contour lines in Qinghai Province. Due to the complex topography of Qinghai, with its interwoven mountains, valleys, and plains (basins), the natural runoff patterns are also quite complex. Therefore, TINs are a suitable model when converting contour lines into surface models. Thus, in this step, an TIN surface data model is established based on the aforementioned vector layers.
[0053] S102. The irregular triangular mesh surface data model is converted into raster data by linear interpolation, and the runoff depth obtained by linear interpolation is assigned to the corresponding raster cell of the raster data.
[0054] The following is combined Figure 2 This section explains the linear interpolation method for converting triangular meshes (TINs) to raster:
[0055] The irregular triangular mesh to raster linear interpolation method is based on the equation of the triangular plane, the general form of which is:
[0056]
[0057] In the formula: a, b, and c are the components of the plane normal vector, and d is a constant term representing the position of the plane in space. The processing steps are: derive the normal vector of the triangular plane from the coordinates of the triangle vertices, obtain the values of a, b, and c, then substitute the known points into the equation of the triangular plane to obtain d. With the plane equation, the z value (height value) can be calculated from the known x and y coordinates of the points in the plane.
[0058] Figure 2In this example, triangle ABC serves as a basic unit of a Triangular Irregular Network (TIN). Assume the coordinates of point A are (1, 1, 10), point B is (3, 1, 15), and point C is (2, 3, 20). The raster center's coordinates are (1.5, 1.5), and its height is unknown. The raster center's height is calculated to be approximately 13 using the steps described above. This height value is then assigned as the cell value to the raster containing the raster center. This process is repeated for each raster cell within each triangle, thus converting the TIN into a raster.
[0059] Considering the limitations of the triangular mesh surface data model in subsequent accuracy control calculations and data statistics, and to meet the needs of practical calculation and statistics, based on the characteristic that the TIN model dataset can be converted to and from the raster dataset, the irregular triangular mesh (TIN) is converted to a raster by interpolation (preferably linear interpolation). Each cell is assigned a height or a null value (NoData) before output, depending on whether the cell center falls within the interpolation area of the TIN.
[0060] Therefore, in this step, to facilitate practical calculations and statistics, the surface data model is converted into raster data, taking advantage of the fact that the TIN model dataset can be converted to and from the raster dataset. In this embodiment, the raster resolution is set to 300 meters (higher resolution means more accurate data; this can be determined based on actual production conditions and computer computing power).
[0061] S103. The raster data is clipped according to the control boundary of the hydrological station to obtain several watershed raster sets. During watershed clipping, the range of the input vector data at the boundary must include 50% or more of the size of a single pixel. This pixel is then used as the output pixel; otherwise, it is not output. Each watershed raster set contains all the raster cells of the corresponding watershed. For each watershed raster set, the average pixel value of all raster cells within the set is taken as the mean runoff depth of the corresponding watershed raster set. The mean runoff depth of the watershed raster set is compared with the measured natural runoff depth of the watershed at the hydrological station to determine the runoff depth correction coefficient. C i :
[0062] C i =Rh i / Rm i
[0063] In the formula, C i Indicates the first i Runoff depth correction factor for each watershed Rh i Indicates the firsti The measured natural runoff depth of the watershed at the hydrological stations in each watershed was determined. Rm i Indicates the first i The mean runoff depth of each watershed grid set; for watersheds without hydrological station control areas, the runoff depth correction factor is taken as 1. i =1,2,…, n , n This represents the total number of watersheds. Since it is impossible to establish hydrological stations on all rivers, in areas without hydrological station control, the extracted watershed raster mean is considered to be the natural runoff depth of the watershed, and the runoff depth correction factor for this situation is set to 1.
[0064] In this step, based on the known vector map layer of the hydrological station's control basin, rasters within the control basin of each hydrological station are cropped according to the unique field order, and these rasters are stored in a designated database as objects, also according to the unique field order. Then, the database is traversed to extract the raster mean (runoff depth) of the raster objects, storing it as a one-dimensional array. The names (serial numbers in this example) and runoff depths are output together as text (txt) as an intermediate process for data verification. From the attributes containing the natural runoff depth field in the hydrological station's control basin polygon layer, the natural runoff depth is extracted according to the unique field order and stored as a one-dimensional array.
[0065] S104. Correct the runoff depth of all grid cells in each watershed, specifically as follows: For the first... i All grid cells within a watershed, the runoff depth of each grid cell multiplied by the [number]th [unit]. i Runoff depth correction factor for each watershed C i The runoff depth correction for the watershed raster cell is completed, and the corrected and updated watershed raster object is obtained.
[0066] In this step, step S104, the watershed raster set obtained in step S103 is stored in the form of a raster list, and the watershed raster set as a raster object and the runoff depth correction coefficient in step S103 are listed as one-dimensional arrays for correction calculation:
[0067] A =[ raster 1, raster 2, ..., raster n ]
[0068] B=[ C 1, C 2, ..., C n ]
[0069] D =A × B= [ D 1 , D 2 ,..., D n ]
[0070] In the formula, A Represented by watershed raster set raster i A one-dimensional array of objects, a watershed raster set raster i It contains several grid cells, and the cell value of each grid cell is the runoff depth obtained by linear interpolation in step S102; B Represents the runoff depth correction factor C i A one-dimensional array, D This indicates the corrected and updated watershed raster object. D i A one-dimensional array.
[0071] like Figure 3 The diagram shows the principle of raster data correction, with blank areas representing assumed empty spaces. In the diagram, the left side represents a region of the watershed raster set, where 3 represents the corresponding runoff depth correction coefficient, and the right side shows the corrected result.
[0072] S105. Mosaic the updated watershed raster objects to obtain a complete raster dataset. The complete raster dataset contains all watershed raster objects in the target area. When cropping the watershed, the range of the input vector data at the boundary must contain 50% or more of the size of a cell. This cell is used as the output cell during cropping; otherwise, it is not output.
[0073] This invention also optimizes the runoff depth contour lines. Specifically, after step S105, bilinear interpolation (an existing method) is used to linearly interpolate the complete raster dataset to obtain an updated runoff depth contour vector map. Then, step S101 is executed using the updated runoff depth contour vector map to continue correcting the runoff depth of the raster data until production requirements are met. Theoretically, at least one iteration is sufficient to meet the requirements. This step also includes handling null values at the seams after mosaicking each watershed. The method is as follows: using the null value as the raster center, the average pixel value of the eight neighboring raster cells is assigned to the central raster.
[0074] The following text combines Figure 4 This paper provides a brief introduction to bilinear interpolation.
[0075] Bilinear interpolation, also known as bilinear interpolation, is used to estimate the value of a specified point based on known data points. Assume four points Q are known. 11 Q12 Q 21 Q 22 The function value, within a rectangular region formed by these four points, is used to determine the value of Q. 11 Q 21 With Q 12 Q 22 Perform linear interpolation separately to obtain the function values at points R1 and R2. Then, perform linear interpolation on R1 and R2 in the y-direction to obtain the function value at the specified point.
[0076] like Figure 4 As shown, consider a nine-cell raster example, where the cell center values are as shown in the image above. We want to create contour lines with an elevation of 830 meters for this raster. The first step is to use bilinear interpolation to calculate the center value of each group of four adjacent cells. Since the raster size is uniform in this example, for the group of four cells located in the upper left corner, the value is calculated as follows: (799 + 802 + 825 + 828) / 4 = 813.5, then rounded to 814. After completion, the path of a specific contour line can be determined using the existing cell center values and the new intersection points.
[0077] S106. After the outlier processing in step S105, a complete raster dataset is obtained. Based on this complete raster dataset, the administrative division vector map and the watershed vector map are overlaid and segmented to obtain several administrative watershed target units. The surface water resources within each administrative watershed target unit are then statistically analyzed. Wr j :
[0078] Wr j =Rd j ×F j
[0079] middle, Wr j Indicates the first j Surface water resources of each administrative river basin target unit Rd j Indicates the first j Runoff depth of each administrative watershed target unit F j Indicates the first j The area of the corresponding region of each administrative river basin target unit j =1,2,…, N , N This indicates the number of administrative watershed target units.
[0080] Since there are many units requiring statistical calculations, calculating and calculating each unit individually would be very labor-intensive. This invention, taking the "Qinghai Water Resources Bulletin" as an example, overlays water resource zones and administrative regions (due to the special nature of the water conservancy industry). All basic unit boundaries are then created in the same vector layer. Using the sequential number in the attribute table as the unique field, the average raster value (runoff depth) of the target area is extracted and output in tabular form. This allows the surface water resource volume of the basic units to be obtained in both layer and table formats. By accumulating these layers upwards, the surface water resource volume of the desired water resource zone or administrative region can be obtained separately.
[0081] S107. Summing the surface water resources of administrative watershed target units within a specified watershed yields the surface water resources of the specified watershed; summing the surface water resources of administrative watershed target units within a specified administrative division yields the surface water resources of the specified administrative division. This invention utilizes the characteristic of raster datasets as the basic data layer, which can be used repeatedly and flexibly. Therefore, the calculated values are relatively fixed each time, facilitating statistical analysis.
[0082] In this step, when using the regional vector layer to count the raster cell values (runoff depth) of the region, at the boundary, if the range of the input vector data includes 50% or more of the cell size, the cell is retained and counted; otherwise, it is not counted. During the count, the rasters inside and outside the boundary are coupled, and there is no duplicate counting during cumulative calculation.
[0083] like Figure 5 The area shown is Zeku County in Huangnan Tibetan Autonomous Prefecture, Qinghai Province, which is divided into three watersheds. Taking the grid (circled in gray) at the boundary between the Zeku County Taolongyangxia to Lanzhou main stream watershed unit and the Zeku County Taodaxia River and Tao River watershed unit as an example, this grid is divided into two by the boundary line. The smaller area (less than 50%) is within the Zeku County Taolongyangxia to Lanzhou main stream watershed unit, and the larger area (greater than 50%) is within the Zeku County Taodaxia River and Tao River watershed unit. Since this grid has a unique value, the runoff depth value of this grid is counted in the Zeku County Taodaxia River and Tao River watershed unit during the regional statistics, while the Zeku County Taolongyangxia to Lanzhou main stream watershed unit is not counted.
[0084] The following explanation is based on production data:
[0085] Figure 6 This table presents a statistical example of surface water resources data for Qinghai Province obtained using this method. Qinghai Province is divided into 95 basic units (only a portion is shown in the figure) by county-level administrative divisions and a three-tiered water resources system. Each unit includes its corresponding watershed sub-district, administrative sub-district, area, runoff depth calculated using this method, and the final calculated surface water resources. This table allows for filtering of any watershed sub-district or administrative region to obtain its surface water resources, thus meeting the needs of actual production work. Example
[0086] like Figure 7 As shown, the runoff depth contour optimization method in this embodiment includes the following steps:
[0087] S201. Convert the target area runoff depth contour vector map into an irregular triangular mesh surface data model, where each node contains a runoff depth value.
[0088] S202. The irregular triangular mesh surface data model is converted into raster data by linear interpolation, and the runoff depth obtained by linear interpolation is assigned to the corresponding raster cell of the raster data.
[0089] S203. The raster data is cropped according to the control boundary of the hydrological station to obtain several watershed raster sets. Each watershed raster set contains all the raster cells of the corresponding watershed. For each watershed raster set, the average pixel value of all raster cells in the watershed raster set is taken as the mean runoff depth of the corresponding watershed raster set. The mean runoff depth of the watershed raster set is compared with the measured natural runoff depth of the watershed at the hydrological station to determine the runoff depth correction coefficient. C i :
[0090] C i =Rh i / Rm i
[0091] In the formula, C i Indicates the first i Runoff depth correction factor for each watershed Rh i Indicates the first i The measured natural runoff depth of the watershed at the hydrological stations in each watershed was determined. Rm i Indicates the first i The mean runoff depth of each watershed grid set; for watersheds without hydrological station control areas, the runoff depth correction factor is taken as 1. i =1,2,…, n , n This represents the total number of river basins.
[0092] S204. Correct the runoff depth of all grid cells in each watershed, specifically as follows: For the first... i All grid cells within a watershed, the runoff depth of each grid cell multiplied by the [number]th [unit]. i Runoff depth correction factor for each watershed C i The runoff depth correction for the watershed raster cell is completed, and the corrected and updated watershed raster object is obtained.
[0093] In this step, the watershed raster set obtained in step S203 is stored in the form of a raster list, and the watershed raster set as a raster object and the runoff depth correction coefficient in step S203 are listed as one-dimensional arrays for correction calculation:
[0094] A =[ raster 1, raster 2, ..., raster n ]
[0095] B=[ C 1, C 2, ..., C n ]
[0096] D = A × B= [ D 1 , D 2 ,..., D n ]
[0097] In the formula, A Represented by watershed raster set raster i A one-dimensional array of objects, a watershed raster set raster i It contains several grid cells, and the cell value of each grid cell is the runoff depth obtained by linear interpolation in step S202; B Represents the runoff depth correction factor C i A one-dimensional array, D This indicates the corrected and updated watershed raster object. D i A one-dimensional array.
[0098] S205. Mosaic the updated watershed raster objects to obtain a complete raster dataset. The complete raster dataset contains all watershed raster objects in the target area. This step also includes handling null values at the seams after each watershed is mosaicked. The method is as follows: using the null value as the raster center, assign the average cell value of the eight neighboring raster cells to the center raster.
[0099] S206. Use bilinear interpolation to perform linear interpolation on the complete raster dataset to obtain an updated runoff depth contour vector map. Then, use the updated runoff depth contour vector map to execute step S201 and continue to correct the runoff depth of the raster data until it meets production requirements.
[0100] S207. Output the corrected runoff depth contour vector map.
[0101] Steps S201-S205 of the method in this embodiment correspond to steps S101-S105 in Embodiment 1, and will not be described in detail in this embodiment.
[0102] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Without departing from the scope of the technical solution of the present invention, some modifications or alterations can be made to the above-disclosed technical content to create equivalent embodiments. As long as the content does not depart from the technical solution of the present invention, it still falls within the scope of the technical solution of the present invention.
Claims
1. A method for calculating surface water resources based on runoff depth contour lines, comprising the following steps: S101. Convert the target area runoff depth contour vector map into an irregular triangular mesh surface data model, where each node contains a runoff depth value; S102. Convert the irregular triangular mesh surface data model into raster data using the linear interpolation method, and assign the runoff depth obtained by linear interpolation to the corresponding raster cell of the raster data. S103. The raster data is cropped according to the control boundary of the hydrological station to obtain several watershed raster sets. Each watershed raster set contains all the raster cells of the corresponding watershed. For each watershed raster set, the average pixel value of all raster cells in the watershed raster set is taken as the mean runoff depth of the corresponding watershed raster set. The mean runoff depth of the watershed raster set is compared with the measured natural runoff depth of the watershed at the hydrological station to determine the runoff depth correction coefficient. C i : C i =Rh i / Rm i In the formula, C i Indicates the first i Runoff depth correction factor for each watershed Rh i Indicates the first i The measured natural runoff depth of the watershed at the hydrological stations in each watershed was determined. Rm i Indicates the first i Mean runoff depth of each watershed grid set; For watersheds without hydrological station control areas, the runoff depth correction factor is taken as 1. i =1,2,…, n , n The total number of river basins; S104. Correct the runoff depth of all grid cells in each watershed, specifically as follows: For the first... i All grid cells within a watershed, the runoff depth of each grid cell multiplied by the [number]th [unit]. i Runoff correction factor for each watershed C i Complete the runoff depth correction for the watershed raster cell and obtain the corrected and updated watershed raster object; S105. Mosaic the above-modified and updated watershed raster objects to obtain a complete raster dataset. The complete raster dataset contains all watershed raster objects in the target area. S106. Overlay and segment the administrative division vector map and the watershed vector map to obtain several administrative watershed target units, and calculate the surface water resources within each administrative watershed target unit. Wr j : Wr j =Rd j ×F j in, Wr j Indicates the first j Surface water resources of each administrative river basin target unit Rd j Indicates the first j Runoff depth of each administrative watershed target unit F j Indicates the first j The area of the corresponding region of each administrative river basin target unit j =1,2,…, N , N Indicates the number of target units in the administrative river basin; S107. Sum the surface water resources of the target units within the designated watershed to obtain the surface water resources of the designated watershed; sum the surface water resources of the target units within the designated administrative division to obtain the surface water resources of the designated administrative division.
2. The method for calculating surface water resources based on runoff depth contour optimization according to claim 1, characterized in that: In step S103, during watershed clipping, the range of input vector data at the boundary includes 50% or more of a pixel size. This pixel is used as the output pixel during clipping; otherwise, it is not output.
3. The method for calculating surface water resources based on runoff depth contour optimization according to claim 1, characterized in that: In step S104, the watershed raster set obtained in step S103 is stored in the form of a raster list, and the watershed raster set as a raster object and the runoff depth correction coefficient in step S103 are listed as one-dimensional arrays for correction calculation: A =[ raster 1, raster 2,..., raster n ] B=[ C 1, C 2,..., C n ] D = A × B= [ D 1 , D 2 ,..., D n ] In the formula, A Represented by watershed raster set raster i A one-dimensional array of objects, a watershed raster set raster i It contains several grid cells, and the cell value of each grid cell is the runoff depth obtained by linear interpolation in step S102; B Represents the runoff depth correction factor C i A one-dimensional array, D This indicates the corrected and updated watershed raster object. D i A one-dimensional array.
4. The method for calculating surface water resources based on runoff depth contour optimization according to claim 1, characterized in that: After step S105 is completed, bilinear interpolation is used to perform linear interpolation on the complete raster dataset to obtain an updated runoff depth contour vector map. Then, step S101 is executed using the updated runoff depth contour vector map to continue the runoff depth correction of the raster data.
5. The method for calculating surface water resources based on runoff depth contour optimization according to claim 4, characterized in that: Step S105 further includes processing the null values at the seams after each watershed is mosaicked. The method is as follows: with the null value as the center of the grid, the average value of the pixels of the eight neighboring grids is assigned to the center grid.
6. The method for calculating surface water resources based on runoff depth contour optimization according to claim 1, characterized in that: In step S106, after the administrative division vector map and the watershed vector map are overlaid, the boundaries of all administrative and watershed target units are made into the same vector map layer. The raster mean of the target area is extracted using the sequence number in the attribute table as the only field, and output in tabular form.
7. The method for calculating surface water resources based on runoff depth contour optimization according to claim 1, characterized in that: When using a region vector layer to count the raster cell values of a region, if the range of the input vector data at the boundary includes 50% or more of the cell size, that cell is retained and counted; otherwise, it is not counted.
8. A method for optimizing runoff depth contour lines, characterized in that: Includes the following steps: S201. Convert the target area runoff depth contour vector map into an irregular triangular mesh surface data model, where each node contains a runoff depth value; S202. Convert the irregular triangular mesh surface data model into raster data using the linear interpolation method, and assign the runoff depth obtained by linear interpolation to the corresponding raster cell of the raster data. S203. The raster data is cropped according to the control boundary of the hydrological station to obtain several watershed raster sets. Each watershed raster set contains all the raster cells of the corresponding watershed. For each watershed raster set, the average pixel value of all raster cells in the watershed raster set is taken as the mean runoff depth of the corresponding watershed raster set. The mean runoff depth of the watershed raster set is compared with the measured natural runoff depth of the watershed at the hydrological station to determine the runoff depth correction coefficient. C i : C i =Rh i / Rm i In the formula, C i Indicates the first i Runoff depth correction factor for each watershed Rh i Indicates the first i The measured natural runoff depth of the watershed at the hydrological stations in each watershed was determined. Rm i Indicates the first i Mean runoff depth of each watershed grid set; For watersheds without hydrological station control areas, the runoff depth correction factor is taken as 1. i =1,2,…, n , n The total number of river basins; S204. Correct the runoff depth of all grid cells in each watershed, specifically as follows: For the first... i All grid cells within a watershed, the runoff depth of each grid cell multiplied by the [number]th [unit]. i Runoff depth correction factor for each watershed C i Complete the runoff depth correction for the watershed raster cell and obtain the corrected and updated watershed raster object; S205. Mosaic the above-modified and updated watershed raster objects to obtain a complete raster dataset. The complete raster dataset contains all watershed raster objects in the target area. S206. Use bilinear interpolation to perform linear interpolation on the complete raster dataset to obtain an updated runoff depth contour vector map. Then, use the updated runoff depth contour vector map to execute step S201 and continue to correct the runoff depth of the raster data until the production needs are met. S207. Output the corrected runoff depth contour vector map.
9. The method for optimizing runoff depth contour lines according to claim 8, characterized in that: In step S204, the watershed raster set obtained in step S203 is stored in the form of a raster list, and the watershed raster set as a raster object and the runoff depth correction coefficient in step S203 are listed as one-dimensional arrays for correction calculation: A =[ raster 1, raster 2,..., raster n ] B=[ C 1, C 2,..., C n ] D = A × B= [ D 1 , D 2 ,..., D n ] In the formula, A Represented by watershed raster set raster i A one-dimensional array of objects, a watershed raster set raster i It contains several grid cells, and the cell value of each grid cell is the runoff depth obtained by linear interpolation in step S202; B Represents the runoff depth correction factor C i A one-dimensional array, D This indicates the corrected and updated watershed raster object. D i A one-dimensional array.
10. The method for optimizing runoff depth contour lines according to claim 9, characterized in that: Step S205 further includes processing the null values at the seams after each watershed is mosaicked. The method is as follows: with the null value as the center of the grid, the average value of the pixels of the eight neighboring grids is assigned to the center grid.