Plain river flood control standard-reaching rate calculation method and device and electronic equipment
By calculating the number of water lines and sections on both sides of the river, building the river center line, and screening the length of the river channel without meeting the standards, the problem of calculating the flood control rate of rivers without embankments in the plains is solved, and a more accurate assessment of the flood control rate is achieved. Lake health evaluation and governance provide a basis.
Patent Information
- Application Number
- CN202411084840.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-22
AI Technical Summary
It is difficult for the prior art to accurately calculate the flood control compliance rate of rivers without embankments in plain areas, and the average river width cannot reflect the changes in river width and the planned width distribution.
By obtaining the waterfront lines on both sides of the river, the planned width and the interval distance between the sections, the number of sections is calculated, the river center line is constructed, and the buffer zone is created with the planned width, the length of the river channel is filtered and calculated, and the flood control compliance rate is calculated.
A more realistic and reliable calculation of flood control compliance rate was achieved, and the problem that the average river channel width was difficult to reflect changes and distribution was overcome, providing a reliable basis for river and lake health evaluation and river channel management.
Smart Images

Figure CN119005797A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of surveying and mapping and geographic information science and technology, and in particular to a method and device for calculating flood control compliance rate of a plain river channel, and electronic equipment. Background Art
[0002] River and lake health assessment is an important part of river and lake management. It is an important means to test the effectiveness of the river chief system and lake chief system. It is an important reference for river chiefs and lake chiefs at all levels to make decisions on river and lake management and protection.
[0003] In the "Guidelines for River and Lake Health Assessment (Trial)", flood control compliance rate is evaluated based on embankments, which is applicable to mountainous rivers. However, in plain areas, only important flood control rivers have embankments, and general rivers often have no embankments. Therefore, the indicator calculation method has defects and cannot meet the calculation of flood control compliance rate for plain rivers without embankments.
[0004] To solve this problem, according to the actual situation, the flood control compliance rate of plain rivers is calculated based on the ratio of the current width of the river to the planned width. The current method for calculating the current width of the river is to divide the water area by the length of the river to calculate the average river width. This method has shortcomings: the average river width is difficult to reflect the changes in the river width and cannot accurately describe the distribution of rivers that do not meet the planned width. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a method and device for calculating the flood control compliance rate of plain rivers, and electronic equipment, so as to solve the problems existing in the related technology that the ratio of average river width to planned river width is difficult to reflect the change of river width and cannot accurately describe the distribution of rivers that do not meet the planned width. By calculating and screening according to rules, the length and spatial distribution of rivers that do not meet the planned width are obtained, and the flood control compliance rate indicator is more real and reliable, providing a basis for the preparation of river and lake health evaluation plans and subsequent comprehensive river management.
[0006] The technical solution adopted in the embodiment of the present invention is as follows:
[0007] In the first aspect, a method for calculating the flood control compliance rate of a plain river is provided, comprising:
[0008] Obtain the waterfront lines on the left and right banks of the river, the planned width of the river, the planned starting point and the planned end point, the minimum length of the waterfront line that does not meet the standard, the minimum width that does not meet the standard and the distance between sections, and calculate the number of sections based on the length of the left bank waterfront line and the distance between sections;
[0009] According to the waterfront lines and the number of sections on the left and right banks, the distances along the section center and the section end points are calculated cyclically, and the sections exceeding the predetermined distance are encrypted, and the results are added to the center point set of the river channel;
[0010] Use the river center point set to construct the river center line and calculate the length;
[0011] Taking the center line of the river as a reference, intercept the center line of the river according to the planned starting point and the planned end point, and create a buffer zone on both sides with half the planned width of the river to obtain the waterfront lines on the left and right banks of the river intersecting with it;
[0012] The waterfront lines on the left and right banks of the intersecting river are broken up to form a collection of segmented waterfront lines on the left and right banks. The segmented left bank waterfront lines in the collection are traversed to find the corresponding segmented right bank waterfront line. If the length and width are both greater than the minimum non-standard waterfront line length and the minimum non-standard width, the two are closed to construct a polygon, and the center line of the river intersecting with them is obtained and added to the collection of non-standard river center lines;
[0013] The sum of the centerline lengths of all rivers that do not meet the standards is counted, and the flood control compliance rate can be calculated.
[0014] Optionally, the number of sections is calculated based on the length of the left bank waterline and the distance between sections, including:
[0015] The value of the number of sections is the maximum integer of the length of the left bank waterline divided by the distance between sections, that is, the number of sections = INT (length of the left bank waterline / distance between sections).
[0016] Optionally, according to the waterfront lines and the number of sections on both sides, the distance between the center point of the section and the end point of the section is calculated cyclically, and the sections exceeding the predetermined distance are encrypted, and the results are added to the center point set of the river channel, including:
[0017] Construct a section line segment according to the starting point and the end point of the section, calculate the midpoint of the section line segment, and simultaneously calculate the distance along the section end point on the right bank waterline, that is, the distance along the section end point, wherein the section starting point is the starting point of the left bank waterline, and the section end point is the starting point of the right bank waterline; the distance along the midpoint of the section line segment and the end point of the section are recorded as the center point of the river channel as a whole, and added to the center line point set of the river channel;
[0018] According to the number of sections, the node on the left bank waterline that meets the distance along the line is obtained in a loop, that is, the starting point of the section. The distance along the line is the current loop value variable multiplied by the section interval distance. Based on this, the nearest point on the right bank waterline is found, that is, the end point of the section. The midpoint of the section line segment curCen_Pt and the distance along the line of the end point of the section curCen_Dis are calculated and recorded as the center point of the river channel curCen. The distance along the line of the end point of the section curCen_Dis is compared with the distance along the line of the end point of the section lastCen of the last point of the river centerline point set to obtain the spacing. If the spacing exceeds the predetermined section interval distance, the right bank is encrypted. The encryption steps are as follows:
[0019] On the left bank, the node that meets the distance along the left waterline minus half of the section interval distance is selected as the section starting point. On the right bank, the number of encrypted sections is calculated according to the spacing and the traversal is carried out. The traversal start value starts from 1, the termination value is the number of encrypted sections, and the distance value is the distance along the end point of the section lastCen_Dis plus the encrypted loop variable multiplied by the section interval distance. The node on the right bank waterline that meets the distance value is selected as the encrypted point, that is, the end point of the section. The distance between the midpoint of the section line segment and the end point of the section is calculated and recorded as the river center point sliceCen, which is added to the river center line point set;
[0020] Add the channel center point curCen to the channel centerline point set, determine the distance between the end point of the right bank waterline and the end point of the section of the last channel center point in the channel centerline point set, if the distance exceeds the predetermined section interval, the right bank is encrypted, the left bank is selected as the node with the end point distance on the left waterline minus half of the section interval as the section starting point, the right bank encrypted point is selected as the section end point, the distance between the midpoint of the section segment and the end point along the line is calculated and recorded as the channel center point, added to the channel centerline point set, with the end point of the left bank waterline as the section starting point and the end point of the right bank waterline as the section end point, the distance between the midpoint of the section segment and the end point along the line is calculated and recorded as the channel center point endCen, added to the channel centerline point set.
[0021] Optionally, use the river center point set to construct the river centerline and calculate the length, including:
[0022] Connect the midpoints of the section segments of the river centerline points in sequence to create the river centerline;
[0023] Add up the lengths of all two adjacent points to get the length of the centerline of the river.
[0024] Optionally, the centerline of the river channel is taken as a reference, the centerline of the river channel is intercepted according to the planned starting point and the planned end point, and a buffer zone is created on both sides with half the planned width of the river channel to obtain the waterfront lines on the left and right banks of the river channel intersecting with it, including:
[0025] Traverse the planned width of the river channel, find the segment starting point and the length along the starting point, the segment end point and the length along the end point of the river channel centerline according to the planned starting point and the planned end point, add the segment starting point to the intercepted river channel centerline point set, traverse the river channel centerline elements, calculate the length along the element, if the length along the element is greater than or equal to the length along the starting point and less than or equal to the length along the end point, add the element to the intercepted river channel centerline point set, and add the segment end point to the intercepted river channel centerline point set;
[0026] The intercepted river centerline point set is connected in sequence to construct the intercepted river centerline. Taking the intercepted river centerline as the benchmark and half of the planned river width as the buffer distance, segmented buffers are created on both sides and added to the planned segmented buffer collection;
[0027] The planned segmented buffer set is traversed, and all the planned segmented buffers are merged to form a river channel planned buffer, and the waterfront lines on the left and right banks of the river channel intersecting with the river channel are obtained.
[0028] Optionally, the waterfront lines on the left and right banks of the intersecting river are broken up to form a collection of segmented waterfront lines on the left and right banks, and the segmented left bank waterfront lines in the collection are traversed to find the corresponding segmented right bank waterfront line. If the length and width are both greater than the minimum non-standard waterfront line length and the minimum non-standard width, the two are closed to construct a polygon, and the center line of the river intersecting with them is obtained and added to the collection of non-standard river center lines, including:
[0029] The waterfront lines on the left and right banks of the intersecting river channels are broken up to form a collection of segmented waterfront lines on the left and right banks;
[0030] Traverse the segmented left bank waterline in the segmented left and right bank waterline collection, take the midpoint of the segmented left bank waterline element, traverse the segmented right bank waterline in the segmented left and right bank waterline collection, take the midpoint of the segmented right bank waterline element, calculate the distance between the midpoint of the segmented left bank waterline element and the midpoint of the segmented right bank waterline element, and after the traversal is completed, the one with the smallest distance that is less than n times the planned width of the river is the segmented right bank waterline corresponding to the left bank;
[0031] Calculate the shortest distances from the segmented left bank waterfront line and the corresponding segmented right bank waterfront line to the center line of the river respectively. Half of the planned width minus the shortest distance is the respective non-standard width. If the lengths and non-standard widths of the segmented left bank waterfront line and the corresponding segmented right bank waterfront line are both greater than the minimum non-standard waterfront line length and minimum non-standard width, extract the segmented left bank waterfront line nodes forward and extract the corresponding segmented right bank waterfront line nodes backward.
[0032] The nodes are added in sequence to form a closed polygon, and the centerline of the substandard river channel that intersects with it is obtained, and added to the collection of centerlines of the substandard river channel. If the length and width of the waterfront lines on the left and right banks of the segment are both less than the minimum length and minimum width of the substandard waterfront line, and there is no corresponding segmented right bank waterfront line, directly traverse the next element.
[0033] Optionally, the sum of the centerline lengths of all rivers that do not meet the standards can be calculated to obtain the flood control compliance rate, including:
[0034] Traverse the collection of river centerlines that do not meet the standards, take the river centerline elements that do not meet the standards and calculate their lengths, count the sum of the lengths of all river centerlines that do not meet the standards, and the percentage of the sum to the river centerline length is the flood control non-compliance rate. 100% minus the flood control non-compliance rate is the flood control compliance rate.
[0035] In a second aspect, a device for calculating flood control compliance rate of a plain river is provided, comprising:
[0036] The acquisition calculation module is used to obtain the waterfront lines on the left and right banks of the river, the planned width of the river, the planned starting point and the planned end point, the minimum length of the waterfront line that does not meet the standard, the minimum width that does not meet the standard and the section interval distance, and calculate the number of sections according to the length of the left bank waterfront line and the section interval distance;
[0037] A calculation encryption module is used to cyclically calculate the distance between the center point of the section and the end point of the section according to the waterfront lines on the left and right banks and the number of sections, encrypt the sections exceeding the predetermined distance, and add the results to the center point set of the river channel;
[0038] The first construction module is used to construct the river centerline using the river center point set and calculate the length;
[0039] The second creation module is used to intercept the center line of the river channel according to the planned starting point and the planned end point based on the center line of the river channel, and create a buffer zone on both sides with half the planned width of the river channel to obtain the waterfront lines on the left and right banks of the river channel intersecting with it;
[0040] The traversal module is used to break up the waterfront lines on the left and right banks of the intersecting river to form a collection of segmented waterfront lines on the left and right banks, traverse the segmented left bank waterfront lines in the collection, and find the corresponding segmented right bank waterfront lines. If the length and width are both greater than the minimum non-standard waterfront length and the minimum non-standard width, the two are closed to construct a polygon, and the center line of the river intersecting with them is obtained, and added to the collection of non-standard river center lines;
[0041] The calculation module is used to count the sum of the centerline lengths of all rivers that do not meet the standards, and the flood control compliance rate can be obtained through calculation.
[0042] According to a third aspect, an electronic device is provided, including:
[0043] one or more processors;
[0044] A memory for storing one or more programs;
[0045] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in the first aspect.
[0046] According to a fourth aspect, a computer-readable storage medium is provided, on which computer instructions are stored, wherein when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
[0047] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0048] This application uses the waterfront lines on both sides of the river to construct the center line of the river, intercepts the center line of the river through the planned starting point and the planned end point, and creates a buffer zone with half the planned width to obtain the waterfront lines on both sides of the river that intersect with it. After judging that the segmented waterfront lines meet the minimum non-standard waterfront line length and the minimum non-standard width requirements, a polygon is constructed by closing, and the center line of the river that intersects with it is calculated, and then the flood control compliance rate is obtained. The existing flood control compliance rate using the ratio of the average river width to the planned river width as the flood control compliance rate is difficult to reflect the changes in the river width and cannot accurately describe the distribution of the river that does not meet the planned width. The technical effect of obtaining the length and spatial distribution of the river that does not meet the planned width through calculation and screening according to rules is achieved. The flood control compliance rate indicator is more real and reliable, providing a basis for the preparation of river and lake health assessment plans and subsequent comprehensive river management.
[0049] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0051] Figure 1 It is a flow chart of a method for calculating flood control compliance rate of a plain river according to an exemplary embodiment.
[0052] Figure 2 FIG. 1 is a plain river channel shown according to an exemplary embodiment.
[0053] Figure 3 A cross section is created along the left bank of a plain river channel according to an exemplary embodiment.
[0054] Figure 4 A plain river channel is shown according to an exemplary embodiment in which a section is created along the left bank and the right bank is encrypted.
[0055] Figure 5 The invention is to create a river channel centerline after calculating the midpoint of a plain river channel section according to an exemplary embodiment.
[0056] Figure 6 The diagram shows a plain river channel according to an exemplary embodiment, in which the center line of the river channel is intercepted in sections according to planning.
[0057] Figure 7 The plain river channel planning buffer zone intersects with the left and right bank waterfront lines according to an exemplary embodiment.
[0058] Figure 8 The present invention is based on an exemplary embodiment showing that the polygons of the segmented waterfront lines of the left and right banks of a plain river intersect with the center line of the river.
[0059] Fig. 9 It is a block diagram of a device for calculating flood control compliance rate of a plain river channel according to an exemplary embodiment.
[0060] Fig.10 The diagram is a structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0061] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0062] Figure 1 is a flow chart showing a method for calculating a flood control compliance rate of a plain river according to an exemplary embodiment. Figure 1 As shown, the method may include the following steps:
[0063] S1: Obtain the waterfront lines on the left and right banks of the river, the planned width of the river, the planned starting point and the planned end point, the minimum length of the waterfront line that does not meet the standard, the minimum width that does not meet the standard and the section interval distance, and calculate the number of sections based on the length of the left bank waterfront line and the section interval distance;
[0064] Specifically, the value of the number of sections is the maximum integer of the length of the left bank waterline divided by the distance between the sections, that is, the number of sections = INT (length of the left bank waterline / distance between the sections).
[0065] In 2023, Jiangbei District of Ningbo City carried out river and lake health assessment work. Because it is located in the Ningbo Plain, the flood control compliance rate in the "Guidelines for River and Lake Health Assessment (Trial)" is obviously not suitable for plain areas based on the evaluation basis of embankments. Therefore, it is proposed to use the ratio of the current width of the river to the planned width as the basis for calculating the flood control compliance rate according to the region. If the segmented planning width is adopted, the planned width, planned starting point, and planned end point of the river for each section must be provided. In order to solve the fragmented line segments that appear during the calculation process, the minimum non-compliant waterline length and the minimum non-compliant width are used as filtering conditions. The section interval distance is used to encrypt the calculation and extract the centerline of the river.
[0066] Figure 2 An exemplary plain river channel is given, with three planned widths for the entire section: Section 1 has a planned width of 20m, a planned starting point (640163.69, 3315174.64), and a planned end point (641433.11, 3314166.99); Section 2 has a planned width of 15m, a planned starting point (641433.11, 3314166.99), and a planned end point (642420.02, 3313579.87); Section 3 has a planned width of 20m and a planned end point (643269.00, 3312811.60). The minimum length of the non-standard waterfront line is 10m, the minimum non-standard width is 0.2m, and the section spacing is 1.0m. The length of the waterline on the left bank of the example river is 4169.86m, and the section spacing distance is 1.0m. The method for calculating the number of sections is the length of the waterline on the left bank divided by the maximum integer of the section spacing distance, that is, the number of sections = INT (length of the waterline on the left bank / section spacing distance) = INT (4169.86 / 1.0) = 4169.
[0067] S2: According to the waterfront lines and the number of sections on the left and right banks, the distances along the section center and the section end are calculated cyclically, and the sections exceeding the predetermined distance are encrypted, and the results are added to the river channel center point set; including the following sub-steps:
[0068] S21: construct a section line segment according to the starting point and the end point of the section, calculate the midpoint of the section line segment, and calculate the distance along the section end point on the right bank waterline, that is, the distance along the section end point, where the starting point of the section is the starting point of the left bank waterline and the end point of the section is the starting point of the right bank waterline; the distance along the midpoint of the section line segment and the end point of the section are recorded as the center point of the river channel, and added to the center line point set of the river channel;
[0069] Specifically, Figure 3 The coordinates (x1, y1) of the starting point L1 of the left bank waterline are (640163.55, 3315183.29), which is the starting point of the section; the coordinates (x2, y2) of the starting point R1 of the right bank waterline are (640163.83, 3315165.99), which is the end point of the section. The coordinates (x, y) of the midpoint of the section line segment are calculated from the starting point and end point of the section. The calculation formula is x = (x1 + x2) / 2, y = (y1 + y2) / 2, so the midpoint of the section ( Figure 5 , C1) coordinates (x, y) are (640163.69, 3315174.64). Since the end point of the section is the starting point of the right bank waterline, the distance along the end point of the section is 0. Taking the starting point of the left bank waterline and the starting point of the right bank waterline as the first section is conducive to the start point of the river centerline being flush with the left bank of the river; the distance along the line between the midpoint of the section line segment and the end point of the section is recorded as the center point of the river and added to the center line point set of the river, which is conducive to the subsequent traversal and value encryption processing.
[0070] S22: According to the number of sections, loop to obtain the node on the left bank waterline that meets the distance along the line, that is, the starting point of the section. The distance along the line is the current loop value variable multiplied by the section interval distance. Based on this, find the nearest point on the right bank waterline, that is, the end point of the section, calculate the midpoint of the section line segment curCen_Pt and the distance along the line curCen_Dis of the end point of the section, record it as the center point of the river channel curCen, compare the distance along the line curCen_Dis of the end point of the section with the distance along the line lastCen_Dis of the end point of the section of the last point of the river centerline point set of the river channel lastCen to obtain the spacing. If the spacing exceeds the predetermined section interval distance, encrypt the right bank. The encryption steps are as follows:
[0071] On the left bank, the node that meets the distance along the left waterline minus half of the section interval distance is selected as the section starting point. On the right bank, the number of encrypted sections is calculated according to the spacing and the traversal is carried out. The traversal start value starts from 1, the termination value is the number of encrypted sections, and the distance value is the distance along the end point of the section lastCen_Dis plus the encrypted loop variable multiplied by the section interval distance. The node on the right bank waterline that meets the distance value is selected as the encrypted point, that is, the end point of the section. The distance between the midpoint of the section line segment and the end point of the section is calculated and recorded as the river center point sliceCen, which is added to the river center line point set;
[0072] Add the channel center point curCen to the channel centerline point set, determine the distance between the end point of the right bank waterline and the end point of the section of the last channel center point in the channel centerline point set, if the distance exceeds the predetermined section interval, the right bank is encrypted, the left bank is selected as the node with the end point distance on the left waterline minus half of the section interval as the section starting point, the right bank encrypted point is selected as the section end point, the distance between the midpoint of the section segment and the end point along the line is calculated and recorded as the channel center point, added to the channel centerline point set, with the end point of the left bank waterline as the section starting point and the end point of the right bank waterline as the section end point, the distance between the midpoint of the section segment and the end point along the line is calculated and recorded as the channel center point endCen, added to the channel centerline point set.
[0073] Specifically, the number of exemplary river sections is 4169, and the loop starts: the variable is taken as 0 for the first loop, and the node on the left bank waterline that meets the distance along the line is obtained. The distance along the line is the current loop value variable multiplied by the section interval distance, that is, 0 multiplied by 1.0 is 0, that is, Figure 2 The starting point of the waterline on the left bank is L1, which is the starting point of the section (640163.55, 3315183.29); using this as the base point, find the nearest point on the waterline on the right bank (640168.14, 3315167.24), that is Figure 2For the adjacent point R2 on the middle right bank, calculate the midpoint of the cross-section line segment curCen_Pt (640165.85, 3315175.27) and the distance along the cross-section end point curCen_Dis (4.46). The distance along the cross-section end point lastCen of the last river center point in the river centerline point set is 0. The distance along the cross-section end point curCen_Dis is compared with the distance along the cross-section end point lastCen_Dis to obtain the spacing, and the spacing between the two is 4.46.
[0074] Since the spacing (4.46) exceeds 1.2 times the section interval distance (1.2), the right bank is encrypted, and the left bank selects the node that meets the distance along the left waterline minus half of the section interval distance (if the result is less than 0, the value is 0) as the section starting point. Since the current distance along the line is 0, minus half of the section interval distance (0.5) is -0.5, which is less than 0, so the left bank selects the starting point of the left bank waterline (640163.55, 3315183.29) as the section starting point. The number of encrypted sections on the right bank is calculated based on the spacing, that is, the maximum integer of the spacing divided by the section interval distance is 4, and the traversal is expanded: the traversal start value starts from 1, and the distance value is the distance along the section end point lastCen_Dis plus the encrypted loop variable multiplied by the section interval distance, that is, 0 plus 1 multiplied by 1.0 is 1.0, and the node on the right bank waterline that meets the distance value of 1.0 is selected as the encrypted point (640164.81, 3315166.30), that is, the section end point, and the midpoint of the section line between the section start point and the section end point (640164.18, 3315174.79) and the distance along the section end point (1.0) are calculated and recorded as the center point of the river channel and added to the river channel centerline point set; the second traversal encryption loop variable is 2 and the distance value is 2.0, the second traversal encryption loop variable is 3 and the distance value is 3.0, and the fourth traversal encryption loop variable is 4 and the distance value is 4.0. During the fifth traversal, the encrypted loop variable is 5. Since the termination value is the number of encrypted sections, 4, the traversal loop is terminated. Figure 3 This is a schematic diagram of the unencrypted cross section of a plain river. Figure 4 This is a schematic diagram of the cross-section densification of plain rivers. The cross-section line densification is conducive to the extraction of a more coherent river centerline.
[0075] The midpoint of the section line segment curCen_Pt (640165.85, 3315175.27) and the distance along the section end point curCen_Dis (4.46) are recorded as the river center point and added to the river centerline point set.
[0076] The number of river sections in the example is 4169, and the second loop is entered: the variable value of the second loop is 1, and the distance along the line is the current loop value variable multiplied by the section interval distance, that is, 1 multiplied by 1.0 is 1.0, and subsequent operations are similar to the first loop.
[0077] After 4169 cycles, the distance along the right bank waterline end point (643263.89, 3312806.27) is the length of the right bank waterline, that is, 4157.96m, and the distance along the line from the end point of the section of the last river center point of the river centerline point set is 4157.13, and the distance between the two is 0.83. Since the spacing does not exceed 1.2 times the section spacing distance, it does not need to be encrypted. Take the end point of the left bank waterline (643274.12, 3312816.89) as the starting point of the section and the end point of the right bank waterline (643263.89, 3312806.27) as the end point of the section, calculate the midpoint of the section line segment (643269.01, 3312811.58) and the distance along the line of the end point of the section (4157.96) and record it as the river center point, and add it to the river centerline point set.
[0078] S3: Use the center point set of the river channel to construct the center line of the river channel and calculate the length; this step includes the following sub-steps:
[0079] S31: connect the midpoints of the section segments of the river channel centerline points in sequence to create the river channel centerline;
[0080] Specifically, the midpoints of the section segments of the river centerline point concentration are connected in sequence to create the river centerline. Figure 5 Hint.
[0081] S32: Add up the lengths of all two adjacent points to obtain the length of the centerline of the river.
[0082] Specifically, the sum of the lengths of all two adjacent points is the length of the centerline of the river. The length of the centerline of the plain river in this example is 4153.58m.
[0083] S4: Taking the center line of the river channel as a reference, intercepting the center line of the river channel according to the planned starting point and the planned end point, and creating a buffer zone on both sides with half the planned width of the river channel to obtain the waterfront lines on the left and right banks of the river channel intersecting with it; this step includes the following sub-steps:
[0084] S41: traverse the planned width of the river channel, find the segment starting point and the length along the starting point, the segment end point and the length along the end point of the river channel centerline according to the planned starting point and the planned end point, add the segment starting point to the intercepted river channel centerline point set, traverse the river channel centerline elements, calculate the element along the line, if the element along the line length is greater than or equal to the starting point along the line length and less than or equal to the end point along the line length, add the element to the intercepted river channel centerline point set, add the segment end point to the intercepted river channel centerline point set;
[0085] Specifically, this example river has three planned widths. Traverse the planned widths of the river: take the planned width of segment 1 as 20m, the planned starting point (640163.69, 3315174.64), the planned end point (641433.11, 3314166.99), find the segment starting point (640163.69, 3315174.64) and the length along the starting point 0m, the segment end point (641433.04, 3314166.85) and the length along the end point 1702.30m, add the segment starting point to the intercepted river centerline point set. Figure 6 As shown, traverse the river centerline nodes: the first node is the starting point C1 of the river centerline, calculate the node length along the line to be 0, greater than or equal to the starting line length 0 and less than or equal to the end line length 1702.30, add node C1 to the intercepted river centerline point set; take node C2, calculate the node length along the line to be 2.23, greater than or equal to the starting line length 0 and less than or equal to the end line length 1702.30, add node C2 to the intercepted river centerline point set... until the node length along the line is greater than 1702.30m, terminate and exit the traversal, and add the segment end point to the intercepted river centerline point set.
[0086] S42: The intercepted river centerline point set is connected in sequence to construct the intercepted river centerline, and segmented buffers are created on both sides with the intercepted river centerline as the benchmark and half of the planned river width as the buffer distance, and added to the planned segmented buffer collection;
[0087] Specifically, the intercepted river centerline point set is connected in sequence to construct the intercepted river centerline. Taking the intercepted river centerline as the benchmark, segmented buffers are created on both sides with a buffer distance of half the planned river width, i.e. 10m, and added to the planned segmented buffer collection.
[0088] S43: traversing the set of planned segmented buffers, merging all planned segmented buffers to form a river channel planned buffer, and obtaining the waterfront lines on the left and right banks of the river channel intersecting with the buffer.
[0089] Specifically, the planned segmented buffer sets are traversed, and all planned segmented buffers are merged to form a river channel planned buffer, and the waterfront lines on the left and right banks of the river channel that intersect with it are obtained. Merging the segmented buffers and then intersecting them with the waterfront lines on the left and right banks of the river channel is beneficial to reducing the number of calculations.
[0090] S5: Break up the waterfront lines on the left and right banks of the intersecting river channel to form a collection of segmented waterfront lines on the left and right banks, traverse the segmented left bank waterfront lines in the collection, and find the corresponding segmented right bank waterfront line. If the length and width are both greater than the minimum non-standard waterfront line length and the minimum non-standard width, the two are closed to construct a polygon, and the center line of the river channel intersecting with them is obtained, and added to the collection of non-standard river channel center lines; this step includes the following sub-steps:
[0091] S51: breaking up the waterfront lines on the left and right banks of the intersecting river channel to form a collection of segmented waterfront lines on the left and right banks;
[0092] S52: traverse the segmented left bank waterline in the segmented left and right bank waterline set, and take the midpoint of the segmented left bank waterline element; traverse the segmented right bank waterline in the segmented left and right bank waterline set, and take the midpoint of the segmented right bank waterline element; calculate the distance between the midpoint of the segmented left bank waterline element and the midpoint of the segmented right bank waterline element. After the traversal is completed, the one with the smallest distance that is less than n times the planned river width is the segmented right bank waterline corresponding to the left bank;
[0093] Specifically, for example, the waterfront lines on the left and right banks of the intersecting river are broken up to form a segmented left and right bank waterfront line collection, and the segmented left bank waterfront line collection is traversed; the midpoint of the segmented left bank waterfront line element is taken, the segmented right bank waterfront line collection is traversed, and the midpoint of the segmented right bank waterfront line element is taken to calculate the distance between the two, such as Figure 7 As shown in the figure, the midpoint of a segmented left bank waterline XJ_L1 is (642154.40, 3313769.77). The set of segmented right bank waterlines is traversed, the midpoint of the segmented right bank waterline element is taken, and the distance between the two is calculated. After the traversal is completed, the one with the shortest distance is the segmented right bank waterline XJ_R1. The distance between the two is 14.39m, which is less than 1.5 times the planned width of the river, that is, 1.5 multiplied by 15 is 22.5m.
[0094] S53: Calculate the shortest distances from the segmented left bank waterfront line and the corresponding segmented right bank waterfront line to the center line of the river respectively. The non-standard width is obtained by subtracting the shortest distance from half of the planned width. If the lengths and non-standard widths of the segmented left bank waterfront line and the corresponding segmented right bank waterfront line are both greater than the minimum non-standard waterfront line length and the minimum non-standard width, extract the segmented left bank waterfront line nodes forwardly and extract the corresponding segmented right bank waterfront line nodes backwardly.
[0095] Specifically, the closest distances from the segmented left bank waterline and the corresponding segmented right bank waterline to the centerline of the river are calculated to be 5.73m and 5.77m respectively. Half of the planned width, i.e. 7.5m minus the closest distance, is the respective substandard widths of 1.77m and 1.73m, both greater than the minimum substandard width of 0.2m. The length of the segmented left bank waterline is 209.21 and the length of the segmented right bank waterline is 199.60, both greater than the minimum substandard waterline length of 10m. Therefore, the segmented left bank waterline nodes are extracted forward and the corresponding segmented right bank waterline nodes are extracted reversely.
[0096] S54: Add the nodes in sequence to form a closed polygon, obtain the substandard river centerline intersecting with it, and add it to the collection of substandard river centerlines. If the length and width of the waterfront lines on the left and right banks of the segment are both less than the minimum substandard waterfront length and the minimum substandard width, and there is no corresponding segment right bank waterfront line, directly traverse the next element.
[0097] Specifically, the aforementioned nodes are added in sequence to form a closed polygon, and the centerline of the river channel that does not meet the standard and intersects with it is obtained. Figure 8 As shown, it is added to the collection of unqualified river centerlines. If the length and width of the waterfront lines on the left and right banks of the segment are both less than the minimum unqualified waterfront length and the minimum unqualified width, and there is no corresponding segment right bank waterfront line, then directly traverse to the next element.
[0098] By using the minimum length and width of the waterfront line that does not meet the standard to filter the segmented left bank waterfront line and the segmented right bank waterfront line, some fragmented line segments generated by spatial intersection can be removed; if the segmented left bank waterfront line has no corresponding segmented right bank waterfront line, it is because the river bends and causes one side of the river to fail to meet the standard, and it is filtered. After filtering and screening, the non-compliant river channels are more targeted.
[0099] S6: Count the sum of the centerline lengths of all rivers that do not meet the standards, and calculate the flood control compliance rate.
[0100] Specifically, the collection of river centerlines that do not meet the standards is traversed, the elements of the river centerlines that do not meet the standards are taken to calculate their lengths, and the sum of the lengths of all river centerlines that do not meet the standards is counted. The percentage of the sum of the lengths of the centerlines that do not meet the standards to the length of the river centerlines is the flood control non-compliance rate, and 100% minus the flood control non-compliance rate is the flood control compliance rate.
[0101]
[0102] Flood control compliance rate = 100% - flood control non-compliance rate
[0103] In this example, the length of the river centerline is 4153.58m, the sum of the lengths of the centerlines of rivers that do not meet the standards is 265.35m, and the flood control non-compliance rate is the percentage of the length of the centerline of rivers that do not meet the standards to the length of the centerline of the river, which is 6.39%; the flood control compliance rate is 100% minus the flood control non-compliance rate, which is 93.61%.
[0104]
[0105] Flood control compliance rate = 100% - flood control non-compliance rate = 100% - 6.39% = 93.61%
[0106] It can be seen from the above technical scheme that this application uses the waterfront lines on both sides of the river to construct the center line of the river, intercepts the center line of the river through the planned starting point and the planned end point, and creates a buffer zone with half the planned width to obtain the waterfront lines on both sides of the river that intersect with it. After judging that the segmented waterfront lines that meet the minimum non-standard waterfront line length and the minimum non-standard width requirements are closed to construct a polygon, the center line of the river that intersects with it is calculated, and then the flood control compliance rate is obtained. The existing flood control compliance rate using the ratio of the average river width to the planned river width as the flood control compliance rate is difficult to reflect the changes in the river width and cannot accurately describe the distribution of rivers that do not meet the planned width. The technical effect of obtaining the length and spatial distribution of rivers that do not meet the planned width through calculation and screening according to rules is achieved. The flood control compliance rate indicator is more real and reliable, which provides a basis for the preparation of river and lake health assessment plans and subsequent comprehensive river management.
[0107] Corresponding to the aforementioned embodiment of the method for calculating the flood control compliance rate of plain rivers, the present application also provides an embodiment of a device for calculating the flood control compliance rate of plain rivers.
[0108] Fig. 9 The present invention is a block diagram of a device for calculating flood control compliance rate of a plain river according to an exemplary embodiment. Fig. 9 , the device comprises:
[0109] The acquisition calculation module 1 is used to obtain the waterfront lines on the left and right banks of the river, the planned width of the river, the planned starting point and the planned end point, the minimum length of the waterfront line that does not meet the standard, the minimum width that does not meet the standard and the section interval distance, and calculate the number of sections according to the length of the left bank waterfront line and the section interval distance;
[0110] The calculation encryption module 2 is used to cyclically calculate the distance between the center point of the section and the end point of the section according to the waterfront lines on the left and right banks and the number of sections, encrypt the sections exceeding the predetermined distance, and add the results to the center point set of the river channel;
[0111] The first construction module 3 is used to construct the river centerline using the river center point set and calculate the length;
[0112] The second creation module 4 is used to intercept the center line of the river channel according to the planned starting point and the planned end point based on the center line of the river channel, and create a buffer zone on both sides with half the planned width of the river channel to obtain the waterfront lines on the left and right banks of the river channel intersecting with it;
[0113] Traversal module 5 is used to break up the waterfront lines on the left and right banks of the intersecting river channel to form a collection of segmented waterfront lines on the left and right banks, traverse the segmented left bank waterfront lines in the collection, and find the corresponding segmented right bank waterfront lines. If the length and width are both greater than the minimum non-standard waterfront line length and the minimum non-standard width, the two are closed to construct a polygon, and the center line of the river channel intersecting with them is obtained, and added to the collection of non-standard river channel center lines;
[0114] The calculation module 6 is used to calculate the sum of the centerline lengths of all rivers that do not meet the standards, and the flood control compliance rate can be obtained through calculation.
[0115] Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.
[0116] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0117] Accordingly, the present application also provides an electronic device, including: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned method for calculating the flood control compliance rate of plain rivers. Fig.10 As shown, a hardware structure diagram of a device having data processing capability for calculating flood control compliance rate of plain river provided by an embodiment of the present invention is shown, except Fig.10 In addition to the processor, memory, DMA controller, disk, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiment is located may also include other hardware, which will not be described in detail, generally based on the actual functions of the device with data processing capabilities.
[0118] Accordingly, the present application also provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-mentioned method for calculating the flood control compliance rate of plain rivers. The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities described in any of the foregoing embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), an SD card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capabilities. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and may also be used to temporarily store data that has been output or is to be output.
[0119] Those skilled in the art will readily appreciate other embodiments of the present application after considering the description and practicing the contents disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The description and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.
[0120] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for calculating flood control compliance rate of plain rivers, characterized in that: include: Obtain the waterfront lines on the left and right banks of the river, the planned width of the river, the planned starting point and the planned end point, the minimum length of the waterfront line that does not meet the standard, the minimum width that does not meet the standard and the distance between sections, and calculate the number of sections based on the length of the left bank waterfront line and the distance between sections; According to the waterfront lines and the number of sections on the left and right banks, the distances along the section center and the section end points are calculated cyclically, and the sections exceeding the predetermined distance are encrypted, and the results are added to the center point set of the river channel; Use the river center point set to construct the river center line and calculate the length; Taking the center line of the river as a reference, intercept the center line of the river according to the planned starting point and the planned end point, and create a buffer zone on both sides with half the planned width of the river to obtain the waterfront lines on the left and right banks of the river intersecting with it; The waterfront lines on the left and right banks of the intersecting river are broken up to form a collection of segmented waterfront lines on the left and right banks. The segmented left bank waterfront lines in the collection are traversed to find the corresponding segmented right bank waterfront line. If the length and width are both greater than the minimum non-standard waterfront line length and the minimum non-standard width, the two are closed to construct a polygon, and the center line of the river intersecting with them is obtained and added to the collection of non-standard river center lines; The sum of the centerline lengths of all rivers that do not meet the standards is counted, and the flood control compliance rate can be calculated.
2. A method for calculating flood control compliance rate of plain rivers according to claim 1, characterized in that: The number of sections is calculated based on the length of the left bank waterline and the distance between sections, including: The value of the number of sections is the maximum integer of the length of the left bank waterline divided by the distance between sections, that is, the number of sections = INT (length of the left bank waterline / distance between sections).
3. The method for calculating the flood control compliance rate of plain rivers according to claim 1 is characterized in that: According to the number of waterfront lines and sections on both sides of the river, the distance between the center point of the section and the end point of the section is calculated cyclically, and the sections exceeding the predetermined distance are encrypted. The results are added to the center point set of the river channel, including: Construct a section line segment according to the starting point and the end point of the section, calculate the midpoint of the section line segment, and simultaneously calculate the distance along the section end point on the right bank waterline, that is, the distance along the section end point, wherein the section starting point is the starting point of the left bank waterline, and the section end point is the starting point of the right bank waterline; the distance along the midpoint of the section line segment and the end point of the section are recorded as the center point of the river channel as a whole, and added to the center line point set of the river channel; According to the number of sections, the node on the left bank waterline that meets the distance along the line is obtained in a loop, that is, the starting point of the section. The distance along the line is the current loop value variable multiplied by the section interval distance. Based on this, the nearest point on the right bank waterline, that is, the end point of the section, is found. The midpoint of the section line segment curCen_Pt and the distance along the line curCen_Dis of the end point of the section are calculated, and recorded as the center point of the river channel curCen. The distance along the line curCen_Dis of the end point of the section is compared with the distance along the line lastCen_Dis of the end point of the section of the last point of the river centerline point set of the river channel center point lastCen to obtain the spacing. If the spacing exceeds the predetermined section interval distance, the right bank is encrypted. The encryption steps are as follows: On the left bank, the node that meets the distance along the left waterline minus half of the section interval distance is selected as the section starting point. On the right bank, the number of encrypted sections is calculated according to the spacing and the traversal is carried out. The traversal start value starts from 1, the termination value is the number of encrypted sections, and the distance value is the distance along the end point of the section lastCen_Dis plus the encrypted loop variable multiplied by the section interval distance. The node on the right bank waterline that meets the distance value is selected as the encrypted point, that is, the end point of the section. The distance between the midpoint of the section line segment and the end point of the section is calculated and recorded as the river center point sliceCen, which is added to the river center line point set; Add the channel center point curCen to the channel centerline point set, determine the distance between the end point of the right bank waterline and the end point of the section of the last channel center point in the channel centerline point set, if the distance exceeds the predetermined section interval, the right bank is encrypted, the left bank is selected as the node with the end point distance on the left waterline minus half of the section interval as the section starting point, the right bank encrypted point is selected as the section end point, the distance between the midpoint of the section segment and the end point along the line is calculated and recorded as the channel center point, added to the channel centerline point set, with the end point of the left bank waterline as the section starting point and the end point of the right bank waterline as the section end point, the distance between the midpoint of the section segment and the end point along the line is calculated and recorded as the channel center point endCen, added to the channel centerline point set.
4. The method for calculating the flood control compliance rate of plain rivers according to claim 1 is characterized in that: Use the river center point set to construct the river center line and calculate the length, including: Connect the midpoints of the section segments of the river centerline points in sequence to create the river centerline; Add up the lengths of all two adjacent points to get the length of the centerline of the river.
5. The method for calculating the flood control compliance rate of plain rivers according to claim 1 is characterized in that: Taking the center line of the river as the reference, the center line of the river is intercepted according to the planned starting point and the planned end point, and a buffer zone is created on both sides with half the planned width of the river to obtain the waterfront lines on the left and right banks of the river intersecting with it, including: Traverse the planned width of the river channel, find the segment starting point and the length along the starting point, the segment end point and the length along the end point of the river channel centerline according to the planned starting point and the planned end point, add the segment starting point to the intercepted river channel centerline point set, traverse the river channel centerline elements, calculate the length along the element, if the length along the element is greater than or equal to the length along the starting point and less than or equal to the length along the end point, add the element to the intercepted river channel centerline point set, and add the segment end point to the intercepted river channel centerline point set; The intercepted river centerline point set is connected in sequence to construct the intercepted river centerline. Taking the intercepted river centerline as the benchmark and half of the planned river width as the buffer distance, segmented buffers are created on both sides and added to the planned segmented buffer collection; The planned segmented buffer set is traversed, and all the planned segmented buffers are merged to form a river channel planned buffer, and the waterfront lines on the left and right banks of the river channel intersecting with the river channel are obtained.
6. The method for calculating the flood control compliance rate of plain rivers according to claim 1 is characterized in that: The waterfront lines on the left and right banks of the intersecting river are broken up to form a collection of segmented waterfront lines on the left and right banks. The segmented left bank waterfront lines in the collection are traversed to find the corresponding segmented right bank waterfront lines. If the length and width are both greater than the minimum unqualified waterfront length and the minimum unqualified width, the two are closed to construct a polygon, and the center line of the river intersecting with them is obtained and added to the collection of unqualified river center lines, including: The waterfront lines on the left and right banks of the intersecting river channels are broken up to form a collection of segmented waterfront lines on the left and right banks; Traverse the segmented left bank waterline in the segmented left and right bank waterline union, and take the midpoint of the segmented left bank waterline element; Traverse the segmented right bank waterline in the set of segmented left and right bank waterline, and take the midpoint of the segmented right bank waterline element; Calculate the distance between the midpoint of the segmented left bank waterfront element and the midpoint of the segmented right bank waterfront element. After the traversal is completed, the one with the smallest distance that is less than n times the planned width of the river channel is the segmented right bank waterfront line corresponding to the left bank; Calculate the shortest distances from the segmented left bank waterfront line and the corresponding segmented right bank waterfront line to the center line of the river respectively. Half of the planned width minus the shortest distance is the respective non-standard width. If the lengths and non-standard widths of the segmented left bank waterfront line and the corresponding segmented right bank waterfront line are both greater than the minimum non-standard waterfront line length and minimum non-standard width, extract the segmented left bank waterfront line nodes forward and extract the corresponding segmented right bank waterfront line nodes backward. The nodes are added in sequence to form a closed polygon, and the centerline of the substandard river channel that intersects with it is obtained, and added to the collection of centerlines of the substandard river channel. If the length and width of the waterfront lines on the left and right banks of the segment are both less than the minimum length and minimum width of the substandard waterfront line, and there is no corresponding segmented right bank waterfront line, directly traverse the next element.
7. The method for calculating the flood control compliance rate of plain rivers according to claim 1 is characterized in that: The sum of the centerline lengths of all rivers that do not meet the standards is calculated to obtain the flood control compliance rate, including: Traverse the collection of river centerlines that do not meet the standards, take the river centerline elements that do not meet the standards and calculate their lengths, count the sum of the lengths of all river centerlines that do not meet the standards, and the percentage of the sum to the river centerline length is the flood control non-compliance rate. 100% minus the flood control non-compliance rate is the flood control compliance rate.
8. A device for calculating flood control compliance rate of plain rivers, characterized in that: include: The acquisition calculation module is used to obtain the waterfront lines on the left and right banks of the river, the planned width of the river, the planned starting point and the planned end point, the minimum length of the waterfront line that does not meet the standard, the minimum width that does not meet the standard and the section interval distance, and calculate the number of sections according to the length of the left bank waterfront line and the section interval distance; A calculation encryption module is used to cyclically calculate the distance between the center point of the section and the end point of the section according to the waterfront lines on the left and right banks and the number of sections, encrypt the sections exceeding the predetermined distance, and add the results to the center point set of the river channel; The first construction module is used to construct the river centerline using the river center point set and calculate the length; The second creation module is used to intercept the center line of the river channel according to the planned starting point and the planned end point based on the center line of the river channel, and create a buffer zone on both sides with half the planned width of the river channel to obtain the waterfront lines on the left and right banks of the river channel intersecting with it; The traversal module is used to break up the waterfront lines on the left and right banks of the intersecting river to form a collection of segmented waterfront lines on the left and right banks, traverse the segmented left bank waterfront lines in the collection, and find the corresponding segmented right bank waterfront lines. If the length and width are both greater than the minimum non-standard waterfront length and the minimum non-standard width, the two are closed to construct a polygon, and the center line of the river intersecting with them is obtained, and added to the collection of non-standard river center lines; The calculation module is used to count the sum of the centerline lengths of all rivers that do not meet the standards, and the flood control compliance rate can be obtained through calculation.
9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Channel wiring method, assembly type channel automatic wiring system, equipment and medium
CN121051989A
