River topographic map splicing method and system
Through the automated river topographic map splicing method, the problems of large workload and low efficiency caused by manual splicing in the existing technology are solved, and efficient river topographic map splicing is achieved, which is suitable for a large number of elevation points and many missing areas.
Patent Information
- Application Number
- CN202411878966.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-05-16
AI Technical Summary
In the prior art, the splicing of actual measured topographic maps of river channels mainly relies on manual methods, resulting in large workload and low work efficiency. Especially when the number of elevation points and irregular areas are missing, manual splicing is almost infeasible.
By constructing the elevation point information of the original measured topographic map and the new measured topographic map, determine the area to be spliced and divide it into multiple convex polygons, determine whether the elevation point is in the spliced area, and use the combined terrain coordinate data to generate a new complete river topographic map.
The automated splicing of river topographic maps is realized, which improves work efficiency, can handle a large number of elevation points and multiple missing areas, and significantly reduces the workload.
Smart Images

Figure CN120014186A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of topographic survey, and specifically refers to a river topographic map splicing method and system. Background Art
[0002] The measured topographic map drawn according to the survey results has become an indispensable basic data in the field of engineering design and scientific research because it contains rich topographic information. For example, to build a three-dimensional terrain model, it is necessary to first propose three-dimensional terrain coordinate data based on the measured topographic map, and then interpolate through the corresponding software (Surfer, ArcGIS) to form a digital elevation model, and finally generate a three-dimensional terrain model to more intuitively display the terrain on the computer. In order to scientifically and rationally study and formulate engineering plans, it is necessary to analyze the changes in the underwater topography of the river in recent years, summarize the evolution laws and analyze the reasons for the evolution, which includes scouring and silting analysis and cross-section change analysis. To carry out such work, first extract the three-dimensional river terrain coordinate data from the surveyed river underwater topographic map, and then import it into the relevant software to perform difference calculations for multiple years, analyze the scouring and silting amount and draw a scouring and silting distribution map, or propose multiple years of cross-sections based on the terrain coordinate data and draw a cross-section change map. In addition, when conducting numerical simulations or physical experiments, in order to establish corresponding mathematical or physical models, it is also necessary to first extract three-dimensional terrain coordinate data from the measured topographic map as the input condition of the model, generate a river grid generalized model with terrain information through interpolation methods, and then perform simulation calculations given the boundaries. It can be seen that a complete and accurate river topographic map is crucial to ensure the smooth development of design research work.
[0003] In the actual scientific research and production process, taking the measured topographic map of the river as an example, the river topography provided by the surveying and mapping department Figure 1Generally, it is a file in CAD format. A complete river CAD topographic map should include rich and complete topographic points. Topographic points store plane coordinates (X coordinates and Y coordinates) and elevation coordinates (Z coordinates). The coverage of topographic points should include areas below the water surface, beaches on both sides, river islands, embankments, etc. However, in actual operation, a problem is often encountered, that is, the topographic map provided by the surveying and mapping department only has the part below the water surface. This may be caused by two reasons. One is that the underwater part of the terrain changes greatly all year round due to the action of flowing water bodies, and the other part of the terrain has little chance of being on the water and changes little during the year, so only the underwater terrain needs to be measured; the second is that the cost of large-scale terrain measurement is high. In order to save costs, only the underwater terrain is forced to be measured. In this case, in order to form a new and complete measured topographic map, the new measured underwater terrain can only be spliced with the original measured water terrain. At present, the manual method is generally used to solve the above problem, that is, first select the water elevation points in the original measured topographic map, and then paste the original coordinates onto the new measured topographic map to form a complete topographic map. This method is suitable for situations where the area is relatively small and there are fewer elevation points, such as when there are only dozens or hundreds of water elevation points that need to be spliced. However, the number of elevation points in the measured topographic map of the general river is in the tens of thousands or hundreds of thousands, and the area where the water elevation points are missing may reach dozens, and the area is also extremely irregular. In this case, the manual method is a huge workload and is not feasible. It can be seen that there is an urgent need to explore new methods to deal with this problem in order to improve work efficiency and solve practical problems. Summary of the invention
[0004] In order to overcome the shortcomings of the above-mentioned technology, the purpose of the present invention is to provide a river topographic map splicing method and system to solve the problem of large workload and low work efficiency when manually splicing new measured underwater topography with original measured water topography.
[0005] To achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0006] A river channel topographic map splicing method is used to splice an original measured topographic map with a new measured topographic map to obtain a new complete river channel topographic map. The method is special in that it includes the following steps:
[0007] 1) Based on the information of each elevation point in the original measured topographic map and the new measured topographic map, construct a terrain coordinate data set respectively;
[0008] 2) Based on the new measured topographic map, determine the splicing area that needs to be spliced from the original measured topographic map, and divide the splicing area into a plurality of convex polygons;
[0009] 3) determining whether each elevation point of the original measured topographic map is within the splicing area, extracting information of all elevation points within the splicing area, and forming a splicing area terrain coordinate data set;
[0010] 4) merging the terrain coordinate data set of the spliced area with the terrain coordinate data set of the new measured topographic map to obtain the latest and complete terrain coordinate data;
[0011] 5) Based on the latest complete topographic coordinate data, a new complete river topographic map is generated after splicing.
[0012] Furthermore, the original measured topographic map and the new measured topographic map are both CAD topographic maps; different information of the CAD topographic map is classified and stored in different layers; the layers include a topographic information layer, and the topographic information layer includes a measured point layer.
[0013] Furthermore, in step 1), the terrain coordinate data set includes the plane position coordinates and elevation value of each elevation point in the measured point layer, the plane position coordinates include X coordinates and Y coordinates, and the elevation value is expressed as Z coordinate.
[0014] Further, step 2) comprises:
[0015] On the new measured topographic map, outline the areas where the terrain is missing and form multiple closed polygons in the plane position;
[0016] The type of each polygon is determined by calculating the internal angles of the polygon: if all the internal angles of the polygon are less than π, it is a convex polygon and proceeds to step 3); if at least one internal angle of the polygon is greater than π, it is a concave polygon and the concave polygon is further segmented until all polygons are convex polygons.
[0017] Furthermore, the calculation method of the inner angle of the polygon is as follows:
[0018] a. First calculate the coordinates of the two vectors at each vertex of the polygon:
[0019]
[0020] b. Then calculate the lengths of the two vectors:
[0021]
[0022] c. Finally, calculate the dot product and cross product of the two vectors:
[0023]
[0024] d. Determine and calculate the angle based on the dot product and cross product of two vectors:
[0025] ①If and Then the angle α between the two vectors is ij Between [0, π / 2), the calculation formula is:
[0026]
[0027] ②If and Then the angle α between the two vectors is ij Between [π / 2, π), the calculation formula is:
[0028]
[0029] ③If and Then the angle α between the two vectors is ij Between [π, 3π / 2), the calculation formula is:
[0030]
[0031] ④If and Then the angle α between the two vectors is ij Between [3π / 2, 2π), the calculation formula is:
[0032]
[0033] Where P ij is the jth vertex of the ith polygon, x i,j ,y i,j The vertices P ij The X and Y coordinates of the
[0034] Furthermore, the concave polygon segmentation method includes: identifying vertices on the concave polygon whose internal angles are greater than π, segmenting with the vertices whose internal angles are greater than π as the starting point, and segmenting the concave polygon into convex polygons with one more number of vertices than the number of vertices whose internal angles are greater than π.
[0035] Further, step 3) comprises:
[0036] The elevation points in the original measured topographic map are connected to the vertices of a single convex polygon. Every two adjacent vertices form a triangle with the elevation point. The sum of the areas of all triangles in the plane is calculated. It is determined whether the sum of the areas is the same as the area of the corresponding single convex polygon. All convex polygons are traversed. If any sum of the areas is the same as the area of the corresponding convex polygon, the elevation point is inside the splicing area. If all sums of the areas are different from the areas of the corresponding convex polygons, the elevation point is not inside the splicing area.
[0037] Furthermore, the calculation method of the sum of the areas of the triangles is as follows:
[0038] a. Calculate the height from the elevation point O(x jj ,y jj , z jj ) Start at polygon vertex D iii (x iii ,y iii , z iii )'s vector coordinates
[0039]
[0040] b. Triangle △OD iii D iii+1 Involving two vectors and Compute the dot product of two vectors:
[0041]
[0042] c. Calculate the lengths of the two vectors respectively:
[0043]
[0044] d. The cosine of the angle between two vectors is:
[0045]
[0046] e. Then the angle between the two vectors is:
[0047]
[0048] f. Triangle △OD iii D iii+1 The area S iii for:
[0049]
[0050] Then the area of the triangle and S are:
[0051]
[0052] Furthermore, step 5) includes writing the complete terrain coordinate data into Autocad to form a spliced river topographic map.
[0053] Furthermore, the addtext and addpoint functions provided by Autocad vba are used to write the above terrain coordinate data into Autocad to form a spliced river topographic map.
[0054] The present invention also provides a river topographic map splicing system, which is special in that it includes:
[0055] A data storage module, used for storing the terrain coordinate data set of the original measured terrain map and the new measured terrain map;
[0056] A data processing module, used to execute steps 2) to 4) in the above-mentioned river topographic map splicing method to obtain the latest and complete topographic coordinate data;
[0057] The data output module is used to output the updated and complete river topographic map.
[0058] Furthermore, the data output module includes an AutoCAD computer-aided design module.
[0059] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor implements the above-mentioned river topographic map splicing method when executing the computer program.
[0060] Compared with the prior art, the present invention has the following beneficial effects:
[0061] A river topographic map splicing method provided by the present invention has the advantages of high automation and high work efficiency. It solves the problems of large workload and low work efficiency in manually splicing new measured underwater topography with original measured water topography. It is particularly suitable for situations with a large number of elevation points and multiple missing areas. It can realize automatic and rapid judgment of elevation points in the area, and extract elevation points for splicing with new topography. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is the complete river channel CAD topographic map measured in 2016 in the specific implementation method;
[0063] Figure 2 It is the CAD topographic map of the river measured in 2018 in the specific implementation method;
[0064] Figure 3 The terrain coordinate data format in the specific implementation mode;
[0065] Figure 4 Schematic diagram of the inner angle of a polygon in a specific implementation manner;
[0066] Figure 5 A schematic diagram of polygon types in a specific implementation manner;
[0067] Figure 6 It is a schematic diagram of polygon segmentation in multiple specific implementation methods;
[0068] Figure 7 It is a schematic diagram of area calculation in a specific implementation manner. DETAILED DESCRIPTION
[0069] In order to better explain the present invention, the main contents of the present invention are further explained below in conjunction with the drawings and specific embodiments, but the contents of the present invention are not limited to the following embodiments.
[0070] Take the local topography of a section of the Yangtze River mainstream as an example. Figure 1 As shown in the CAD topographic map of the complete river measured in 2016, the terrain within the dikes on both sides is complete, and the elevation points cover all areas above and below the water; Figure 2 As shown in the CAD topographic map of the river measured in 2018, the topography within the dikes on both sides is incomplete, with only the underwater topography, and the topography of the river island and the beach is missing. In the actual design and research process, it is required to use the newer 2018 topographic map. Therefore, it is necessary to transfer the 2016 water topography to the 2018 topographic map to form a complete topographic map.
[0071] The length of a natural river channel is generally tens of kilometers or even hundreds of kilometers, and the number of elevation points is generally in the hundreds of thousands or millions. In such a long river channel, the number of river islands, beaches and other areas with missing terrain may also reach dozens or hundreds. For a large number of elevation points and multiple missing areas, how to automatically and quickly determine the elevation points in the area and extract the elevation points and splice them with the new terrain is the main problem faced. The present invention provides a fully automatic river channel topographic map splicing method, which splices the 2016 water topographic map and the 2018 topographic map through the following three steps:
[0072] 1) Construct terrain coordinate data set
[0073] The river CAD topographic map contains rich information. In addition to elevation information, there are also various land features and engineering information. Different information is classified and stored in different layers. According to the different contents, the layers are divided into the following categories: 1) Layers containing topographic information, such as measured point layer (above water and underwater), calculated curve (above water and underwater), first curve (above water and underwater), DGX, DSX, etc.; 2) Layers containing building facilities, such as transportation and ancillary facilities, pipelines and ancillary facilities, working condition buildings and ancillary facilities, etc.; 3) Layers containing flood control and water-related buildings, such as embankments, docks, revetments, bridges, etc.; 4) Layers containing mapping information, such as outline layer, hydrology, place names, etc. The terrain information in the river topographic map is generally contained in the "measured point layer", "above water measured point layer" or "underwater measured point layer". The specific terrain coordinate data is generally carried by the objects in the layer. There are four main types of carrier objects in the topographic map: circle, point, text, and block reference. At this time, the plane position coordinates are the plane position coordinates of each type of object, and the elevation value is the content of each type of object.
[0074] Using the VBA editor that comes with AutoCAD, first use the selection structure to locate the object in the "measured point layer" or "above water measured point layer" or "underwater measured point layer". Then establish a loop for all objects in the above layers, judge the type of a single object inside the loop, and then extract the plane position coordinates and content of each type of object, and write them into the file to obtain a terrain coordinate data file. For this embodiment, it is necessary to establish two terrain coordinate data files, namely "2016 terrain coordinate data.TXT" and "2018 terrain coordinate data.TXT". Each terrain coordinate data file contains three columns of values, from left to right, namely X coordinate, Y coordinate and Z coordinate, see Figure 3 As shown. Set the number of terrain elevation points in 2016 to n 2016 The number of terrain elevation points in 2018 is n 2018 At this point, the terrain coordinate data set is constructed.
[0075] 2) Determine the splicing area and divide it
[0076] Since the terrain was missing in 2018, the splicing area should be determined based on the measured terrain map of 2018. On the measured terrain map of 2018, the area where the terrain was missing was manually outlined to form m closed polygons. For the i-th (i=1, ..., m) polygon, it is assumed that the polygon has mm i vertices, each vertex P ij The plane coordinates are (x i,j ,y i,j )(i=1,...,m, j=1,...,mm i). It should be noted that polygons are divided into two categories: convex polygons and concave polygons. The methods proposed in this invention are all for convex polygons. Therefore, if there are concave polygons, it is necessary to further split the concave polygons into convex polygons. Here, the type of polygon is first determined, the angle value at each vertex is calculated, and the type of polygon is determined. The internal angle of the polygon is calculated using the following method:
[0077] like Figure 4 As shown, first calculate the coordinates of the two vectors at each vertex of the polygon:
[0078]
[0079] Then calculate the lengths of the two vectors:
[0080]
[0081] Finally, we calculate the dot product and cross product of the two vectors:
[0082]
[0083] Determine and calculate the angle based on the dot product and cross product of two vectors:
[0084] ①If and Then the angle α between the two vectors is ij Between [0, π / 2), the calculation formula is:
[0085]
[0086] ②If and Then the angle α between the two vectors is ij Between [π / 2, π), the calculation formula is:
[0087]
[0088] ③If and Then the angle α between the two vectors is ij Between [π, 3π / 2), the calculation formula is:
[0089]
[0090] ④If and Then the angle α between the two vectors is ij Between [3π / 2, 2π), the calculation formula is:
[0091]
[0092] Using the above method, loop to calculate the internal angle value α at each vertex of the i-th polygon ij (j=1、……、mm i ). According to the above angle calculation results, there are two cases for the i-th polygon. In the first case, all the internal angles of the polygon are less than π, which means it is a convex polygon and is marked as 0. In the second case, at least one angle in the polygon is greater than π, which means it is a concave polygon and is marked as 1. Figure 5 For all polygons, determine their types (i=1, ..., m) in a loop and mark them.
[0093] For polygons marked as 0, i.e. convex polygons, no further processing is required and the next step of judgment can be carried out. For polygons marked as 1, i.e. concave polygons, further segmentation is required due to the existence of angles greater than π. The specific segmentation method is to further segment the concave polygon into multiple convex polygons. According to the above polygon internal angle calculation results, the vertices of the concave polygon with angles greater than π are first identified, and then segmentation is performed based on these vertices. After segmentation, the number of convex polygons is one more than the number of vertices with angles greater than π.
[0094] For example, Figure 6 As shown, there are 5 vertices with angles greater than π in the concave polygon, namely A, B, C, D, and E. Based on these 5 vertices, it can be divided into 6 convex polygons, namely the first convex polygon 1, the second convex polygon 2, the third convex polygon 3, the fourth convex polygon 4, the fifth convex polygon 5, and the sixth convex polygon 6. The above method is used to divide all concave polygons, and the total number of polygons is n. 多边形 indivual.
[0095] 3) Determine whether the elevation point is inside the area
[0096] After the area to be spliced is determined, it is necessary to determine which elevation points are within the splicing area based on the terrain coordinate data of 2016. The judgment idea is that if the splicing area is a closed convex polygon, the sum of the areas of several triangles formed by the elevation point and the polygon vertices is equal to the area of the polygon, then the point is within the polygon, otherwise the point is outside the polygon.
[0097] For any ii-th convex polygon after the segmentation in step 2), it is assumed that it has a total of nn ii vertices, the plane coordinates of each vertex are (x iii ,y iii )(iii=1、2、......、nn ii ), its area can be directly determined by CAD query as S ii For the jj-th elevation point O in the 2016 terrain coordinate dataset, its coordinates are (xjj ,y jj , z jj ), the necessary condition for it to be inside a convex polygon is to draw lines from point O to connect nn ii vertices, divide the polygon into n ii A triangle, this nn ii The sum of the areas of the triangles on the plane should be equal to S ii , so we need to calculate the area of each triangle, the calculation diagram is shown in Figure 7 As shown. First, calculate the distance from point O to the polygon vertex D iii The vector coordinates of:
[0098]
[0099] Triangle △OD iii D iii+1 Involving two vectors and Compute the dot product of two vectors:
[0100]
[0101] Compute the lengths of two vectors separately:
[0102]
[0103] The cosine of the angle between two vectors is:
[0104]
[0105] The angle between the two vectors is:
[0106]
[0107] Triangle △OD iii D iii+1 The area S iii for:
[0108]
[0109] Then the area and S are:
[0110]
[0111] If S = S ii , then point O is inside the polygon; otherwise, point O is outside the polygon. 2016 Elevation points, loop to determine whether each elevation point is inside a convex polygon, if so, its three-dimensional coordinates (x jj ,y jj , z jj) is recorded in the "joined area terrain coordinate data.TXT" file. Then for n 多边形 For a polygonal area, the above method is used to cyclically determine the situation of the elevation points, and the three-dimensional coordinates of all the elevation points in the area are recorded in the "joined area terrain coordinate data.TXT" file.
[0112] 4) Terrain stitching
[0113] Merge the two files "2018 terrain coordinate data.TXT" and "joined area terrain coordinate data.TXT" to get the complete terrain coordinate data.
[0114] 5) Generate river topographic map
[0115] By using the addtext and addpoint functions of Autocad vba to write the above terrain coordinate data into Autocad, a spliced river topographic map can be formed.
[0116] This specific embodiment also provides a river topographic map splicing system, including:
[0117] A data storage module, used for storing the terrain coordinate data set of the original measured terrain map and the new measured terrain map;
[0118] A data processing module, used to execute steps 2) to 4) in the above-mentioned river topographic map splicing method to obtain complete topographic coordinate data;
[0119] The data output module includes an AutoCAD computer-aided design module, which is used to execute the above step 5) and output an updated complete river channel topographic map.
[0120] This specific embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor implements the above-mentioned river topographic map splicing method when executing the computer program.
[0121] The technical features of the above-described embodiments can be combined arbitrarily. To make the description concise, not all combinations of the technical features in the above-described embodiments are described. The above-described embodiment only expresses one of the implementation methods of the method of the present invention. The description is relatively specific and detailed and should not be understood as limiting the scope of the patent of the present invention. The present invention is not limited to the above-described optional implementation methods. All modifications, equivalent substitutions and improvements made within the scope of the claims of the present invention shall be included in the scope of protection of the present invention.
Claims
1. A river channel topographic map splicing method for splicing an original measured topographic map with a new measured topographic map to obtain a new complete river channel topographic map, characterized in that: The following steps are involved: 1) Based on the information of each elevation point in the original measured topographic map and the new measured topographic map, construct a terrain coordinate data set respectively; 2) Based on the new measured topographic map, determine the splicing area that needs to be spliced from the original measured topographic map, and divide the splicing area into a plurality of convex polygons; 3) determining whether each elevation point of the original measured topographic map is within the splicing area, extracting information of all elevation points within the splicing area, and forming a splicing area terrain coordinate data set; 4) merging the terrain coordinate data set of the spliced area with the terrain coordinate data set of the new measured topographic map to obtain the latest and complete terrain coordinate data; 5) Based on the latest complete topographic coordinate data, a new complete river topographic map is generated after splicing.
2. The river topographic map splicing method according to claim 1, characterized in that: The original measured topographic map and the new measured topographic map are both CAD topographic maps; different information of the CAD topographic map is classified and stored in different layers; the layers include a topographic information layer, and the topographic information layer includes a measured point layer.
3. The river topographic map splicing method according to claim 2, characterized in that: In step 1), the terrain coordinate data set includes the plane position coordinates and elevation value of each elevation point in the measured point layer, the plane position coordinates include X coordinates and Y coordinates, and the elevation value is expressed as Z coordinate.
4. The river topographic map splicing method according to claim 1, characterized in that: Step 2) includes: On the new measured topographic map, outline the areas where the terrain is missing and form multiple closed polygons in the plane position; The type of each polygon is determined by calculating the internal angles of the polygon: if all the internal angles of the polygon are less than π, it is a convex polygon and proceeds to step 3); if at least one internal angle of the polygon is greater than π, it is a concave polygon and the concave polygon is further segmented until all polygons are convex polygons.
5. The river topographic map splicing method according to claim 4 is characterized in that: The concave polygon segmentation method comprises: identifying vertices on the concave polygon whose internal angles are greater than π, segmenting the concave polygon using the vertices whose internal angles are greater than π as the starting point, and segmenting the concave polygon into convex polygons whose number is one more than the number of vertices whose internal angles are greater than π.
6. The river topographic map splicing method according to claim 1, characterized in that: Step 3) includes: The elevation points in the original measured topographic map are connected to the vertices of a single convex polygon. Every two adjacent vertices form a triangle with the elevation point. The sum of the areas of all triangles in the plane is calculated. It is determined whether the sum of the areas is the same as the area of the corresponding single convex polygon. All convex polygons are traversed. If any sum of the areas is the same as the area of the corresponding convex polygon, the elevation point is inside the splicing area. If all sums of the areas are different from the areas of the corresponding convex polygons, the elevation point is not inside the splicing area.
7. The river topographic map splicing method according to any one of claims 1 to 6, characterized in that: Step 5) includes writing the complete terrain coordinate data into Autocad to form a spliced river topographic map.
8. A river topographic map splicing system, characterized by: include: A data storage module, used for storing the terrain coordinate data set of the original measured terrain map and the new measured terrain map; A data processing module, used to execute steps 2) to 4) of the river topographic map splicing method according to any one of claims 1 to 7 to obtain new complete topographic coordinate data; The data output module is used to output the updated and complete river topographic map.
9. The river topographic map splicing system according to claim 8, characterized in that: The data output module includes an AutoCAD computer-aided design module.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the computer program, the river topographic map splicing method described in any one of claims 1 to 7 is implemented.