A method for marking the direction of water flow in topographic maps
By acquiring topographic map and DEM data, constructing a square grid and annotating the water flow direction, it solves the high cost and low efficiency problems caused by manual reliance on water flow direction annotation in topographic maps, and achieves automated, accurate and efficient water flow direction annotation.
Patent Information
- Application Number
- CN202410106620.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-24
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-01-24
AI Technical Summary
The annotation of water flow direction in topographic maps mainly relies on manual operations, which results in high time and labor costs. It is also inefficient in small-scale and large-scale maps, making it difficult to verify the accuracy of the annotation results. It is especially error-prone in the construction of farmland water conservancy facilities.
By obtaining the original topographic map and DEM data, establish a water system labeling layer, construct a grid, determine the element type and label it, use the DEM data to update the water flow direction label, detect and modify the labeling results, and finally copy it to the original topographic map to complete the water flow Orientation label.
It realizes automatic processing of water flow direction annotation, improves the accuracy and efficiency of annotation, reduces manual errors, saves cost and time, simplifies the work process, and ensures the immediacy and accuracy of water flow direction annotation.
Smart Images

Figure CN118115628B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of water conservancy engineering, and in particular to a method for marking the direction of water flow in a water system on a topographic map. Background Art
[0002] The marking of the direction of water flow in the water system of the topographic map belongs to the work of topographic map finishing. At present, the finishing work of the topographic map is basically completed manually. The finishing of the topographic map of each destination is completed by each project team. When the water system volume to be marked is large or extremely large, the time cost and labor cost also increase exponentially, and the results cannot be verified. If the accuracy of the marking results needs to be verified, the same cost investment is required. After the automation of the marking of the direction of water flow in the water system of the topographic map, the cost of the topographic map in the finishing stage is greatly reduced, and the results can be verified in time, and the non-compliant parts can be modified to ensure the accuracy of the marking. According to the requirements of the topographic map for marking the water system, the direction of water flow in the water system of the topographic map needs to be marked. The traditional method is basically to manually determine the direction of water flow based on contour lines and elevation points and mark it manually. When the scale of the topographic map is smaller and the map range is larger, the more elements are involved, and the water system conditions also increase. In this case, the traditional method is still used to mark the direction of water flow, which is not only time-consuming and inefficient, but also difficult to verify the correctness. When using topographic maps at present, the direction of water flow is often missing. Especially when constructing farmland water conservancy facilities, it is often necessary to plan according to the existing water system and water flow direction to ensure that the water conservancy facilities can irrigate and drain. In the topographic map used in the design, the elevation points are too sparse, making it difficult to determine the water flow direction, and the manual marking workload is heavy and prone to errors. Summary of the invention
[0003] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method for marking the direction of water flow in a topographic map, which solves the problem that map finishing work in the prior art is done manually, which requires a lot of time and labor costs, and it is not easy to judge the direction of water flow, which leads to low efficiency and inability to verify the results.
[0004] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:
[0005] A method for marking the direction of water flow in a water system of a topographic map is provided, which comprises the following steps:
[0006] S1. Obtain the original topographic map and the corresponding topographic map data and DEM data; establish a water system annotation layer;
[0007] S2, extracting elements from topographic map data to obtain water system layers; constructing a grid;
[0008] S3. Use the grid to determine the type of element and mark it in the water system annotation layer;
[0009] S4. According to the DEM data, the water flow direction is marked for the marked elements, and the water system marking layer is updated;
[0010] S5, testing the updated water system annotation layer;
[0011] S6. Copy the detected water system annotation layer to the original topographic map to obtain a topographic map with the water flow direction marked, thus completing the annotation of the water flow direction of the water system in the topographic map.
[0012] Furthermore, the water system layer in step S2 includes A1 single-line elements, A2 double-line elements, and A3 closed figures; A1 single-line elements are branch canals; A2 double-line elements are main canals and rivers; A3 closed figures are ponds and reservoirs.
[0013] Furthermore, the specific process of constructing the grid in step S2 is as follows:
[0014] Take each element as a processing unit; select the southernmost, northernmost, easternmost, and westernmost coordinate points in the processing unit to form the extraction range; extract the maximum value of the X coordinate X in the extraction range 1max and minimum value X 1min , the maximum value of the Y coordinate Y 1max and minimum value Y 1min ; Connect the maximum value of X coordinate X 1max and minimum value X 1min , the maximum value of the Y coordinate Y 1max and minimum value Y 1min Construct a parallelogram using the corresponding four coordinate points; inside the parallelogram, draw straight lines every 50 meters from east to west and from north to south to construct a grid.
[0015] Furthermore, step S3 further includes:
[0016] S3-1, determine whether the element is a closed figure; if so, proceed to step S3-2; otherwise, proceed to step S3-3;
[0017] S3-2, using the grid to determine whether the closed figure satisfies X1max-X1min<50 and Y1max-Y1min<50; if so, the element is determined to be a pond and annotated inside the element of the water system annotation layer; otherwise, the element is determined to be a reservoir and annotated inside the element of the water system annotation layer; proceed to step S3-6;
[0018] S3-3, using the grid to determine whether the element is a single line and X1max-X1min>50 or Y1max-Y1min>50; if so, the element is determined to be a branch channel and annotated inside the element of the water system annotation layer, and the process goes to step S3-6; otherwise, the element is determined to be a double line and the process goes to step S3-4;
[0019] S3-4, according to the formula:
[0020]
[0021] The length L of the line connecting the adjacent intersection points of the double-line element is obtained; wherein X1 and X2 respectively represent the horizontal coordinates of a pair of adjacent intersection points of the double-line element in the grid and the water system layer, and Y1 and Y2 respectively represent the vertical coordinates of a pair of adjacent intersection points of the double-line element in the grid and the water system layer;
[0022] S3-5, determining whether the length L of the line connecting the adjacent intersection points of the double-line element is less than 3 meters; if so, determining that the double-line element is a river; otherwise, determining that the double-line element is a main canal;
[0023] S3-6. Repeat steps S3-1 to S3-5 until the types of all elements are determined.
[0024] Furthermore, step S4 further includes:
[0025] S4-1. Extract the turning point of the single-line canal of the branch canal and use it as the elevation point, and use the DEM data corresponding to the turning point of the single-line canal of the branch canal as the starting point elevation value;
[0026] S4-2, determine whether the elevation points of the branch canal meet the requirements of decreasing or increasing sequence; if so, proceed to step S4-3; otherwise, return to step S4-1;
[0027] S4-3, judging whether the elevation value of the elevation point of the branch canal is less than the elevation value of the adjacent elevation point; if so, the water flow direction is the arrow from the adjacent elevation point toward the elevation point; otherwise, the water flow direction is the arrow from the elevation point toward the adjacent elevation point;
[0028] S4-4, according to the formula:
[0029]
[0030]
[0031] Get the midpoint coordinates XZ and YZ of each pair of intersections of the double-line elements in the grid and the water system layer; where X1′ and X2′ represent the horizontal coordinates of a pair of adjacent intersections of the double-line elements in the grid and the water system layer, and Y1′ and Y2′ represent the vertical coordinates of a pair of adjacent intersections of the double-line elements in the grid and the water system layer;
[0032] S4-5, the midpoint coordinates (X Z ,Y Z ) as the vertex and connect them in sequence to construct the center line corresponding to the double-line feature;
[0033] S4-6. According to the center line of the double-line feature, the corresponding DEM data is extracted as the elevation value through ARCGIS;
[0034] S4-7. Mark the water flow direction of the double-line elements according to their elevation values.
[0035] Furthermore, the specific process of step S4-7 is:
[0036] Determine whether the elevation value of the vertex is less than the elevation value of the adjacent vertex; if so, the water flow direction of the double-line element is the arrow from the adjacent vertex toward the vertex; otherwise, the water flow direction of the double-line element is the arrow from the vertex toward the adjacent vertex.
[0037] Furthermore, the specific process of the detection in step S5 is: checking and modifying the position, that is, for a single-line channel, if the distance of the marked position from the center line single-line channel reaches the deviation threshold or is covered, it needs to be manually moved to the side of the single-line channel; for a main channel, pond, or river, if its mark is not inside it, it is moved inside it;
[0038] Check and modify the attributes, that is, check whether the names of channels, rivers and reservoirs are marked incorrectly or missed.
[0039] The beneficial effects of the present invention are as follows: the method can automatically process direction marking and quickly and effectively complete water flow direction marking; when the amount of data is large, it can avoid errors caused by manual adjustment, timely and accurately verify the accuracy of marking, and improve the accuracy of topographic map marking; efficiently complete the water system marking of the topographic map, simplify the work process, thereby reducing the workload of personnel, saving costs, reducing time investment, and improving work efficiency, and achieving the immediacy and accuracy of water flow direction marking. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0041] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0042] like Figure 1 As shown, a method for marking the direction of water flow in a water system of a topographic map is provided, which comprises the following steps:
[0043] S1. Obtain the original topographic map and the corresponding topographic map data and DEM data; establish a water system annotation layer;
[0044] S2, extracting elements from topographic map data to obtain water system layers; constructing a grid;
[0045] The water system layer in step S2 includes A1 single-line elements, A2 double-line elements, and A3 closed figures; A1 single-line elements are branch canals; A2 double-line elements are main canals and rivers; A3 closed figures are ponds and reservoirs.
[0046] The specific process of constructing the grid in step S2 is as follows:
[0047] Take each element as a processing unit; select the southernmost, northernmost, easternmost, and westernmost coordinate points in the processing unit to form the extraction range; extract the maximum value of the X coordinate X in the extraction range 1max and minimum value X 1min , the maximum value of the Y coordinate Y 1max and minimum value Y 1min ; Connect the maximum value of X coordinate X 1max and minimum value X 1min , the maximum value of the Y coordinate Y 1max and minimum value Y 1min Construct a parallelogram using the corresponding four coordinate points; inside the parallelogram, draw straight lines every 50 meters from east to west and from north to south to construct a grid.
[0048] S3. Use the grid to determine the type of feature and mark it in the water system annotation layer; use the east-west and north-south spans and feature shapes as standards to distinguish ponds, rivers, channels, and reservoirs. Ponds and reservoirs are closed figures, and channels and rivers are linear features; distinguish ponds, reservoirs and rivers and channels by feature shape; the width of ponds is usually less than 50 meters, and 50 meters is used as the critical value to distinguish ponds from rivers, channels, and reservoirs. Those greater than 50 meters are rivers, channels, and reservoirs, and those less than or equal to 50 meters are ponds. Among linear features, branch canals are single-line, and double-line is a river or main canal. Single-line and double-line are used to distinguish branch canals from main canals and rivers. Rivers are usually not less than 3 meters, and 3 meters is used as the critical value. Those less than 3 meters are main canals, and those greater than 3 meters are rivers.
[0049] Step S3 further includes:
[0050] S3-1, determine whether the element is a closed figure; if so, proceed to step S3-2; otherwise, proceed to step S3-3;
[0051] S3-2, using the grid to determine whether the closed figure satisfies X1max-X1min<50 and Y1max-Y1min<50, that is, the spans in the east-west and north-south directions are both less than 50 meters; if so, the element is determined to be a pond and annotated inside the element of the water system annotation layer; otherwise, the element is determined to be a reservoir and annotated inside the element of the water system annotation layer; proceed to step S3-6;
[0052] S3-3, using the grid to determine whether the element is a single line, and X1max-X1min>50 or Y1max-Y1min>50, that is, a linear element with a span of more than 50 meters in one direction; if so, the element is determined to be a branch canal and annotated inside the element of the water system annotation layer, and then proceed to step S3-6; otherwise, the element is determined to be a double line and proceed to step S3-4;
[0053] S3-4, according to the formula:
[0054]
[0055] The length L of the line connecting the adjacent intersection points of the double-line element is obtained; wherein X1 and X2 respectively represent the horizontal coordinates of a pair of adjacent intersection points of the double-line element in the grid and the water system layer, and Y1 and Y2 respectively represent the vertical coordinates of a pair of adjacent intersection points of the double-line element in the grid and the water system layer;
[0056] S3-5, determining whether the length L of the line connecting the adjacent intersection points of the double-line element is less than 3 meters; if so, determining that the double-line element is a river; otherwise, determining that the double-line element is a main canal;
[0057] S3-6. Repeat steps S3-1 to S3-5 until the types of all elements are determined.
[0058] S4. According to the DEM data, the water flow direction is marked for the marked elements and the water system annotation layer is updated; the water flow direction is not marked for reservoirs and ponds; the branch canal is a single line, and the turning point coordinates are directly extracted to mark the water flow direction; the river and main canal are double lines, and the center line needs to be constructed, and then the coordinates and elevation are extracted to mark the water flow direction.
[0059] Step S4 further includes:
[0060] S4-1. Extract the turning point of the single-line canal of the branch canal and use it as the elevation point, and use the DEM data corresponding to the turning point of the single-line canal of the branch canal as the starting point elevation value;
[0061] S4-2, determine whether the elevation points of the branch canal meet the requirements of decreasing or increasing sequence; if so, proceed to step S4-3; otherwise, return to step S4-1;
[0062] S4-3, judging whether the elevation value of the elevation point of the branch canal is less than the elevation value of the adjacent elevation point; if so, the water flow direction is the arrow from the adjacent elevation point toward the elevation point; otherwise, the water flow direction is the arrow from the elevation point toward the adjacent elevation point;
[0063] S4-4, according to the formula:
[0064]
[0065]
[0066] Get the midpoint coordinates X of each pair of intersections of the grid and the double line elements in the water system layer Z and Y Z ; Among them, X1′ and X2′ respectively represent the horizontal coordinates of a pair of adjacent intersection points of double-line elements in the grid and the water system layer, and Y1′ and Y2′ respectively represent the vertical coordinates of a pair of adjacent intersection points of double-line elements in the grid and the water system layer;
[0067] S4-5, the midpoint coordinates (X Z ,Y Z ) as the vertex and connect them in sequence to construct the center line corresponding to the double-line feature;
[0068] S4-6. According to the center line of the double-line feature, the corresponding DEM data is extracted as the elevation value through ARCGIS;
[0069] S4-7. Mark the water flow direction of the double-line elements according to their elevation values.
[0070] The specific process of step S4-7 is:
[0071] Determine whether the elevation value of the vertex is less than the elevation value of the adjacent vertex; if so, the water flow direction of the double-line element is the arrow from the adjacent vertex toward the vertex; otherwise, the water flow direction of the double-line element is the arrow from the vertex toward the adjacent vertex.
[0072] S5, testing the updated water system annotation layer;
[0073] The specific process of detection in step S5 is: check and modify the position, that is, for a single-line channel, if the marked position deviates from the center line single-line channel by a distance that reaches the deviation threshold or is covered, it needs to be manually moved to the side of the single-line channel; for a main channel, pond, or river, if its marking is not inside it, it is moved inside it; check and modify the attributes, that is, check whether the names of the channel, river, or reservoir are marked incorrectly or missing.
[0074] S6. Copy the detected water system annotation layer to the original topographic map to obtain a topographic map with the water flow direction marked, thus completing the annotation of the water flow direction of the water system in the topographic map.
[0075] This method determines the category of water system elements based on the east-west and north-south spans and element width of the element, and labels the names in the newly created water system layer; then generates the center line through the intersection of the element and the grid, extracts the turning point coordinates of the center line, and then extracts the elevation corresponding to the turning point coordinates through DEM, and then determines the direction of water flow by judging the logical relationship of the turning point elevation, and automatically labels the direction of water flow. Finally, the correctness of the labeled position and the correctness of the category labeling are manually checked, and if correct, they are superimposed with the original topographic map to complete the topographic map water system labeling.
[0076] In summary, the present invention can automatically process direction marking and complete water flow direction marking quickly and effectively; when the amount of data is large, it can avoid errors caused by manual adjustment, and timely and accurately verify the accuracy of marking, thereby improving the accuracy of topographic map marking; efficiently complete the water system marking of the topographic map, simplify the work process, and thus reduce the workload of personnel, and save costs, reduce time investment, and improve work efficiency, thereby achieving the immediacy and accuracy of water flow direction marking.
Claims
1. A method for marking the direction of water flow in a water system on a topographic map, characterized by: The following steps are involved: S1. Obtaining the original topographic map and corresponding topographic map data and DEM data; Create a water system annotation layer; S2, extracting elements from topographic map data to obtain water system layers; constructing a grid; S3. Use the grid to determine the type of element and mark it in the water system annotation layer; S4. According to the DEM data, the water flow direction is marked for the marked elements, and the water system marking layer is updated; S5, testing the updated water system annotation layer; S6, copying the detected water system annotation layer to the original topographic map to obtain a topographic map with the water flow direction marked, that is, completing the marking of the water flow direction of the water system in the topographic map; The water system layer in step S2 includes A1 single-line element, A2 double-line element, and A3 closed figure; the A1 single-line element is a branch canal; the A2 double-line element is a main canal and a river; the A3 closed figure is a pond and a reservoir; The specific process of constructing the grid in step S2 is as follows: Take each element as a processing unit; select the southernmost, northernmost, easternmost, and westernmost four coordinate points in the processing unit to form the extraction range; extract Maximum value of coordinates and minimum value , Maximum value of coordinates and minimum value ;connect Maximum value of coordinates and minimum value , Maximum value of coordinates and minimum value The corresponding four coordinate points construct a parallelogram; Inside the parallelogram, draw straight lines every 50 meters from east to west and from north to south to construct a grid; The step S3 further comprises: S3-1, determine whether the element is a closed figure; if so, proceed to step S3-2; otherwise, proceed to step S3-3; S3-2. Use the grid to determine whether the closed figure meets the requirements. and ; If yes, the element is determined to be a pond and annotated inside the element of the water system annotation layer; otherwise, the element is determined to be a reservoir and annotated inside the element of the water system annotation layer; proceed to step S3-6; S3-3. Use the grid to determine whether the element is a single line and or ; If yes, the element is determined to be a branch channel and annotated inside the element of the water system annotation layer, and the process goes to step S3-6; otherwise, the element is determined to be a double line and the process goes to step S3-4; S3-4, according to the formula: Get the length of the adjacent intersection lines of the double line element ;in, , They represent the horizontal coordinates of a pair of adjacent intersection points of the double-line elements in the grid and the water system layer. , They represent the ordinates of a pair of adjacent intersection points of the double-line elements in the grid and the water system layer; S3-5. Determine the length of the line connecting the adjacent intersection points of the double-line element Is it less than 3 meters? If so, the double-line feature is determined to be a river; otherwise, the double-line feature is determined to be a main canal; S3-6, repeating steps S3-1 to S3-5 until the types of all elements are determined; The step S4 further comprises: S4-1. Extract the turning point of the single-line canal of the branch canal and use it as the elevation point, and use the DEM data corresponding to the turning point of the single-line canal of the branch canal as the starting point elevation value; S4-2, determine whether the elevation points of the branch canal meet the requirements of decreasing or increasing sequence; if so, proceed to step S4-3; otherwise, return to step S4-1; S4-3, judging whether the elevation value of the elevation point of the branch canal is less than the elevation value of the adjacent elevation point; if so, the water flow direction is the arrow from the adjacent elevation point toward the elevation point; otherwise, the water flow direction is the arrow from the elevation point toward the adjacent elevation point; S4-4, according to the formula: Get the midpoint coordinates of each pair of intersections between the grid and the double-line elements in the water system layer and ;in, , They represent the horizontal coordinates of a pair of adjacent intersection points of the double-line elements in the grid and the water system layer. , They represent the ordinates of a pair of adjacent intersection points of the double-line elements in the grid and the water system layer; S4-5. The midpoint coordinates of each pair of intersection points Use them as vertex points and connect them in sequence to construct the center line corresponding to the double-line feature; S4-6. According to the center line of the double-line feature, the corresponding DEM data is extracted as the elevation value through ARCGIS; S4-7. Mark the water flow direction of the double-line elements according to the elevation values of the double-line elements; The specific process of step S4-7 is as follows: Determine whether the elevation value of the vertex is less than the elevation value of the adjacent vertex; if so, the water flow direction of the double-line element is the arrow from the adjacent vertex toward the vertex; otherwise, the water flow direction of the double-line element is the arrow from the vertex toward the adjacent vertex; The specific process of detection in step S5 is: Check and modify the position. For a single-line channel, if the marked position deviates from the center line of the single-line channel by a distance that reaches the deviation threshold or is covered, it needs to be manually moved to the side of the single-line channel. For a main channel, pond, or river, if the marking is not inside it, it needs to be moved inside it. Check and modify the attributes, that is, check whether the names of channels, rivers and reservoirs are marked incorrectly or missed.
