An automatic detection method for river bend contradictions
By calculating the intersection points and direction angles of river elements and contour line elements and setting sensitivity values, the problem of low automation in existing technologies is solved, fast and accurate detection of river bend contradictions is achieved, and the production process of vector map data is optimized.
Patent Information
- Application Number
- CN202411680994.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The existing Hequ contradiction detection method has a low degree of automation, incomplete detection, and low efficiency, making it difficult to cope with batch detection tasks, and manual detection is prone to omissions and errors.
By generating the intersection points of river elements and contour line elements, calculating the elevation and direction angle of the intersection points, and setting the sensitivity value to determine whether there are contradictions in the river bend, automatic detection can be achieved.
It improves the accuracy and efficiency of river bend contradiction detection, reduces the workload of manual inspection, ensures the quality and consistency of vector map data, and is suitable for large-scale, high-precision vector map data detection.
Smart Images

Figure CN119579667B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of geographic information data processing, and in particular to a method for automatically detecting river bend contradictions. Background Art
[0002] In the development of basic surveying and mapping, river bend inconsistencies not only affect the readability and usability of maps but also negatively impact the production and updating of basic geographic spatial data. Therefore, river bend inconsistency detection is a crucial step in map quality assessment, playing a crucial role in improving the accuracy and application value of map data. With the continuous advancement of technology, automated and intelligent data detection methods are becoming more sophisticated and widespread, providing stronger support for the quality control of basic surveying and mapping data.
[0003] Currently, automated detection of river meander discrepancies primarily focuses on cases where river elements repeatedly cross the same contour line within a small area. For cases where river elements do not follow valley paths, manual visual inspection is typically used. This method is slow and inefficient, requiring significant manpower and material resources for batch inspections and resulting in lengthy processing cycles. Furthermore, manual visual inspection is effective when river elements do not cross contour valleys with significant deviations. However, when deviations are smaller, manual inspection relies heavily on personal experience, making it difficult to maintain accurate standards and prone to missed detections.
[0004] In summary, existing methods for detecting river bend contradictions have low automation, incomplete detection, low efficiency, and difficulty in handling batch detection tasks. Faced with the increasing amount of vector map data, a method for detecting river bend contradictions that is fast, low-cost, accurate, reliable, comprehensive, and highly automated is urgently needed. Summary of the Invention
[0005] In view of this, an embodiment of the present invention provides a method for automatically detecting river bend contradictions to solve the technical problems of the existing technology of difficult river bend contradiction judgment and low degree of automation. The method includes:
[0006] Generate river feature data and contour feature data through vector map data, traverse the river feature data and contour feature data, obtain the intersection points of each river feature and the contour line, generate a list of intersection point coordinates, and save the intersection points and the corresponding elevation values of the intersection points into the river feature data;
[0007] Obtain the elevation values of all points corresponding to each river element in the river element data, sort all points of the river element in descending order of elevation values, and generate sorted river element data;
[0008] Traverse the intersection point coordinate list, take the intersection point as the center point, determine the first vector line segment along the direction of the contour line through the contour line feature data, and calculate the first direction angle corresponding to the first vector line segment. Traverse the intersection point coordinate list, take the intersection point as the starting point, determine the second vector line segment along the direction of the river feature flow through the sorted river feature data, and calculate the second direction angle corresponding to the second vector line segment.
[0009] Set the sensitivity value and determine whether there is a contradiction in the river bend based on the angle of the first direction angle, the angle of the second direction angle and the sensitivity value.
[0010] Compared with the prior art, the at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects:
[0011] By inserting intersection points into river feature data without elevation values and calculating the elevation value of each component point of the river feature, adjusting the component points of the river feature data so that the elevation values are sorted from large to small, checking and filtering the river feature data after inserting the intersection points, calculating the direction of the vector line segments on both sides of the intersection point on the contour line, and calculating the angle between each contour line vector and the river feature vector, river bend contradictions in vector map data can be detected. This detection method is highly accurate and reliable, and can effectively improve the detection speed of river bend contradictions, avoiding the problems of missed detection and high-frequency false detection in manual detection and traditional methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0013] Figure 1 This is a flow chart of a method for automatically detecting river bend contradictions provided by an embodiment of the present invention;
[0014] Figure 2 This is a flow chart of an embodiment of the present invention for implementing the above-mentioned method for automatically detecting river bend contradictions;
[0015] Figure 3 It is a schematic diagram of the azimuth angle calculation principle provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0016] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0017] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the features in the following embodiments and embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative work are within the scope of protection of this application.
[0018] This embodiment of the present invention proposes an automated detection method for river bend contradictions, aiming to address the shortcomings of current detection technologies and improve detection accuracy and efficiency. The specific steps are as follows:
[0019] First, calculate all the intersection points of rivers and contour lines, and assign elevation values to the corresponding contour lines. Secondly, sort the river intersection points in descending order according to their elevation values, and obtain the linear river features after inserting the intersection points. Calculate the azimuths of the vector line segments on both sides of the intersection points on the contour lines from near to far, as well as the azimuths of the vector line segments from the intersection point to the current intersection point of the river feature and then to the next intersection point. Finally, calculate the angle between the azimuth of the vector line segment on each contour line feature and the azimuth of the vector line segment on the river feature, and count the ratio of all angles less than 90 degrees. If the ratio is less than the preset sensitivity value (the default value is 0.75), it is judged that there is a river bend contradiction; otherwise, it is judged that there is no river bend contradiction.
[0020] In an embodiment of the present invention, a method for automatically detecting river bend contradictions is provided, such as Figure 1 and Figure 2 As shown, the method includes:
[0021] Step S101: Generate river feature data and contour feature data from vector map data, traverse the river feature data and contour feature data, obtain the intersection points of each river feature and the contour line, generate a list of intersection point coordinates, and save the intersection points and their corresponding elevation values to the river feature data;
[0022] Step S102: Obtaining the elevation values of all points corresponding to each river element in the river element data, sorting all points of the river element in descending order of elevation value, taking the river element as a unit, to generate sorted river element data;
[0023] Step S103: traversing the intersection point coordinate list, taking the intersection point as the center point, determining a first vector line segment along the direction of the contour line using the contour line feature data, and calculating a first direction angle corresponding to the first vector line segment; traversing the intersection point coordinate list, taking the intersection point as the starting point, determining a second vector line segment along the direction of the river feature flow using the sorted river feature data, and calculating a second direction angle corresponding to the second vector line segment;
[0024] Step S104: setting a sensitivity value, and judging whether there is a contradiction in the river bend according to the angle of the first direction angle, the angle of the second direction angle and the sensitivity value.
[0025] In specific implementation, in order to calculate the intersection point of the current river feature and the contour line and the contour line feature data containing the intersection line, the river features that have no intersection relationship with the contour line are filtered out, and the river features that have an intersection relationship with the contour line are retained. The following steps are used to traverse the river feature data and the contour line feature data, obtain the intersection point of each river feature and the contour line, generate a list of the intersection point coordinates, and insert the intersection point into the corresponding contour line feature data:
[0026] Traverse the river feature data and perform the following operations until all river features in the river feature data are processed: traverse the contour feature data to obtain the intersection point between the current river feature and the contour line. If an intersection point exists, save the intersection point to the intersection point coordinate list; obtain the elevation value of the corresponding intersection point based on the elevation value of the contour line; traverse the intersection point coordinate list and insert the intersection point and the corresponding elevation value of the intersection point into the corresponding contour feature data.
[0027] Specifically, the contour feature data and river feature data are filtered out from the vector map data according to the feature type, and the elevation value is obtained from the attribute record corresponding to the current contour line. The elevation value is assigned to the current contour line data and the Z coordinate is established, so that the contour line X and Y coordinates become X, Y, Z coordinates.
[0028] In specific implementation, in order to unify all river feature data into single-line river feature data, the following steps are performed to convert the double-line river feature data into single-line river feature data:
[0029] The river element type of each river element in the river element data is determined, and the double-line river element data in the river element data is converted into single-line river element data according to the river element type, and then saved in the river element data.
[0030] Specifically, determine whether the river element is a single-line river element or a double-line river element. If it is a double-line river element, calculate the center line of the spatial geometry of the double-line river element, and convert the double-line river element into a single-line river element through the center line of the spatial geometry, so as to simplify the river element data.
[0031] Specifically, the linear river features are traversed, and then the contour line features are traversed. Then, the intersection points of the current linear river feature and the contour line feature are found to generate a list of river-contour line feature intersection coordinates that intersect both the river and the contour line.
[0032] In practice, in order to sort the river feature data by elevation (i.e., sort the rivers (river features) according to their physical characteristic of flowing from high to low), the elevation values are first calculated. The following steps are performed to obtain the elevation values of all points of each river feature in the river feature data:
[0033] Get the coordinate dimension of each river feature in the river feature data; if the coordinate dimension is two-dimensional, calculate the elevation values of all points in each river feature through the intersection point coordinate list; if the coordinate dimension is three-dimensional, get the elevation values of all points in each river feature.
[0034] In specific implementation, the following steps are used to calculate the elevation values of all points in each river element through the intersection point coordinate list:
[0035] Traverse the intersection point coordinate list and insert the intersection point into the corresponding river feature data; calculate the distance between the intersection point and other points in the river feature, and calculate the elevation values of all points in each river feature through the distance and the elevation value of the intersection point.
[0036] Specifically, determine the coordinate dimension of the river element. If it is two-dimensional, insert the traversed intersection points into the corresponding river element point list, and calculate the elevation values of the remaining points according to the ratio of the contour interval between the two points and the length of the river element between the contour lines of the two points.
[0037] In practice, in order to delete abnormal river feature data (abnormal means that the elevation value of the river feature increases with the flow direction of the river feature, that is, the river flows from low to high), the following steps are performed to directly obtain the elevation value and delete the abnormal data if the coordinate dimension of the river feature is three-dimensional:
[0038] If the coordinate dimension of the river feature is three-dimensional, before obtaining the elevation value of the river feature, determine whether the elevation value corresponding to each river feature in the river feature data satisfies the conditions from high to low; if not, save the data of the river feature to the abnormal river feature data and delete it from the river feature data.
[0039] Specifically, the first two points of the river element are used to determine whether the elevation values of the current river component points are from high to low or from low to high. If it is from low to high, the order of the current river elements is reversed to form a high to low order.
[0040] Specifically, if the coordinate dimension of the river element is three-dimensional, it is determined whether the elevation values of all points in the current river element data meet the condition that the elevation value of the previous point is greater than the elevation value of the next point. If not, it is recorded in the abnormal river spatial geometry list; otherwise, it is recorded in the normal linear river element list.
[0041] In specific implementation, in order to calculate the direction of the first vector line segment on both sides of the intersection point on the contour line, the following steps are performed to traverse the intersection point coordinate list, take the intersection point as the center point, determine the first vector line segment along the direction of the contour line using the contour line feature data, and calculate the angle of the first direction angle corresponding to the first vector line segment:
[0042] Traverse the intersection point coordinate list and perform the following operations until all intersection points are processed: traverse the contour feature data, use the distance difference method with the intersection point as the center point, and determine multiple first vector line segments along the two directions of the contour line; use the angle between each first vector line segment and the positive direction of the X-axis of the coordinate system where the intersection point coordinate list is located as the first direction angle to obtain multiple first direction angles.
[0043] In a specific implementation, in order to facilitate the calculation of the first direction angle, the following steps are performed to convert the first direction angle into an angle within a set angle range if the first direction angle exceeds 360 degrees:
[0044] After obtaining the first direction angle, obtain the angle of the first direction angle; determine whether the angle of each first direction angle is within a set angle range, where the set angle range is 0 to 360 degrees; if the angle of the first direction angle is not within the set angle range, convert the angle of each first direction angle to within the set angle range.
[0045] like Figure 3 As shown, traverse the list of intersection points of contour lines and rivers (intersection point coordinate list), and after obtaining the intersection point, traverse the coordinate points on the contour line and use the distance difference method to find the current intersection point on the contour line. Then calculate the two vector line segments c1, c2, c3, and c4 closest to the intersection point on both sides of the contour line, and calculate the azimuth of these four vector line segments from the near intersection point to the far intersection point. If the calculated azimuth is not in the range of 0 to 360 degrees, add or subtract an appropriate multiple of 360 degrees to the azimuth of the c1, c2, c3, and c4 vectors, and convert the azimuth of the c1, c2, c3, and c4 vectors to the range of 0 to 360 degrees.
[0046] Among them, the distance difference method is to calculate the distance between two points less than a certain minimum value (for example, 10 -8 ). Taking the two closest vector segments on both sides of the intersection point on the same contour line can increase the reliability of the judgment.
[0047] The method for determining the second direction angle is the same as the first direction angle (traverse the intersection point coordinate list and perform the following operations until all intersection points are processed: traverse the river feature data, take the intersection point as the starting point, and determine the second vector segment along the direction of the river feature flow through the sorted river feature data). Use the same method as determining the first direction angle to find the intersection point on the river feature (the intersection point of the river feature and the contour line), and calculate the second azimuth angle of the vector segment r1 from the intersection point to the next point of the intersection point (the angle between the second vector segment and the positive direction of the X axis, Figure 3 In the embodiment, the calculated angle is 1. The second azimuth angle of the r1 vector is converted to a range of 0 to 360 degrees using the same method as in the previous step. The direction of flow of the river element is from high to low according to the elevation value of the river element.
[0048] In specific implementation, the following steps are used to determine whether a river bend is contradictory based on the angle of the first direction angle, the angle of the second direction angle, and the sensitivity value:
[0049] Determine the number of angles less than 90 degrees among the angles of the first direction angle and the angles of the second direction angle, use the number as the judgment basis quantity, and use the sum of the number of the first direction angle and the number of the second direction angle as the total quantity; calculate the ratio of the judgment basis quantity to the total quantity, and use the ratio as the actual sensitivity value; compare the actual sensitivity value and the sensitivity value, if the actual sensitivity value is less than the sensitivity value, then there is a contradiction in the river bend, if the actual sensitivity value is greater than or equal to the sensitivity value, then there is no contradiction in the river bend.
[0050] Specifically, the ratio of the number of angles less than 90 degrees to the total number of angles (first direction angle and second direction angle) between the c1, c2, c3 and c4 vector segments (four first vector segments) on the contour lines and the r1 vector segment (one second vector segment) on the linear river elements is calculated through the above recorded results. When compared with the input sensitivity value, it is determined whether there is a river bend contradiction. If the ratio is less than the input sensitivity value (the default is 0.75), there is a river bend contradiction, otherwise there is no river bend contradiction.
[0051] The automatic river bend contradiction detection method of this embodiment improves the accuracy and efficiency of river bend contradiction detection, effectively reduces the workload of manual inspection, and ensures the quality and consistency of vector map data. Through automated analysis, river bend contradictions can be quickly and reliably identified and resolved, thereby optimizing the vector map data production process.
[0052] The embodiments of the present invention achieve the following technical effects:
[0053] The automatic detection method for river bend contradictions in the embodiment of the present invention can quickly detect logical errors in the direction of river elements that are inconsistent with common sense from the entire vector map data containing dense contour lines and complex river elements; through automated detection, the accuracy and efficiency of river bend contradiction detection can be greatly improved, human errors can be reduced, and at the same time, the dependence on manual detection is reduced, and labor costs and resource consumption are reduced; by accurately calculating the spatial relationship between river elements and contour lines, and combining geographical common sense to make reasonable judgments, the efficiency of river bend contradiction detection is significantly improved, and it is suitable for large-scale, high-precision vector map data quality detection, which not only optimizes the detection process of vector map data, but also provides a solid foundation for the application of geographic spatial data.
[0054] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A method for automatically detecting river bend contradictions, characterized in that: include: Generate river element data and contour line element data from vector map data, traverse the river element data and the contour line element data, obtain the intersection points of each river element and the contour line, generate a list of intersection point coordinates, and save the intersection points and the elevation values corresponding to the intersection points in the river element data; Obtaining elevation values of all points corresponding to each river element in the river element data, sorting all points of the river element in descending order of the elevation values, taking the river element as a unit, to generate sorted river element data; Obtaining the elevation values of all points corresponding to each river element in the river element data, including: Obtaining the coordinate dimension of each river element in the river element data; If the coordinate dimension is two-dimensional, the elevation values of all points in each river element are calculated using the intersection point coordinate list, including: Traversing the intersection point coordinate list, inserting the intersection point into the corresponding river element data; calculating the distance between the intersection point and other points in the river element, and calculating the elevation values of all points in each river element based on the distance and the elevation value of the intersection point; If the coordinate dimension is three-dimensional, obtain the elevation values of all points in each river element; Traversing the intersection point coordinate list, taking the intersection point as the center point, determining a first vector line segment along the direction of the contour line using the contour line element data, and calculating a first direction angle corresponding to the first vector line segment; traversing the intersection point coordinate list, taking the intersection point as the starting point, determining a second vector line segment along the direction of the river element flow using the sorted river element data, and calculating a second direction angle corresponding to the second vector line segment; Traversing the intersection point coordinate list, taking the intersection point as the center point, determining a first vector line segment along the direction of the contour line using the contour line feature data, and calculating a first direction angle corresponding to the first vector line segment, including: Traverse the intersection point coordinate list and perform the following operations until all the intersection points are processed; traverse the contour line feature data, use the distance difference method to determine multiple first vector line segments along the two directions of the contour line with the intersection point as the center point; compare each first vector line segment with the coordinate system of the intersection point coordinate list X The included angle of the positive direction of the axis is used as a first direction angle, and a plurality of the first direction angles are obtained; A sensitivity value is set, and whether there is a contradiction in the river bend is determined according to the angle of the first direction angle, the angle of the second direction angle, and the sensitivity value.
2. The method for automatically detecting river bend contradictions according to claim 1, wherein: Also includes: After obtaining the first direction angle, obtaining the angle of the first direction angle; Determining whether each of the first direction angles is within a set angle range, wherein the set angle range is 0 to 360 degrees; If the angle of the first direction angle is not within the set angle range, the angle of each first direction angle is converted to within the set angle range.
3. The automatic detection method for river bend contradictions according to claim 1, characterized in that: Judging whether there is a contradiction in the river bend according to the angle of the first direction angle, the angle of the second direction angle, and the sensitivity value includes: Determine the number of angles less than 90 degrees between the first direction angle and the second direction angle, use the number as a determination basis quantity, and use the sum of the number of the first direction angles and the number of the second direction angles as a total quantity; Calculating a ratio of the number of judgment bases to the total number, and using the ratio as an actual sensitivity value; Whether there is a contradiction in the river bend is determined based on the actual sensitivity value and the sensitivity value.
4. The method for automatically detecting river bend contradictions according to claim 3, wherein: Judging whether there is a contradiction between the meander according to the actual sensitivity value and the sensitivity value includes: Comparing the actual sensitivity value with the sensitivity value, if the actual sensitivity value is smaller than the sensitivity value, then there is a contradiction in the meander; If the actual sensitivity value is greater than or equal to the sensitivity value, then there is no contradiction in the meander.
5. The method for automatically detecting river bend contradictions according to claim 1, wherein: Traversing the river element data and the contour line element data, obtaining the intersection points of each river element and the contour line, generating a list of intersection point coordinates, and saving the intersection points and the elevation values corresponding to the intersection points to the river element data, including: Traversing the river element data, performing the following operations until all river elements in the river element data are processed; Traversing the contour line element data, obtaining the intersection point between the current river element and the contour line, and if the intersection point exists, saving the intersection point to the intersection point coordinate list; According to the elevation value of the contour line, the elevation value of the corresponding intersection point is obtained; The intersection point coordinate list is traversed, and the intersection points and the elevation values corresponding to the intersection points are inserted into the corresponding contour line element data.
6. The method for automatically detecting river bend contradictions according to any one of claims 1 to 5, characterized in that: Also includes: The river element type of each river element in the river element data is determined, and double-line river element data in the river element data is converted into single-line river element data according to the river element type, and then saved in the river element data.
7. The method for automatically detecting river bend contradictions according to any one of claims 1 to 5, characterized in that: Also includes: If the coordinate dimension of the river element is three-dimensional, before obtaining the elevation value of the river element, determine whether the elevation value corresponding to each river element in the river element data satisfies the order from high to low; If the condition is not met, the data of the river element is saved to the abnormal river element data and deleted from the river element data.
Citation Information
Patent Citations
Three-dimensional Douglas-Peucker algorithm based map simulation method for synchronous integration of river network elements and DEM
CN104978763A
Coastal siltation type river comprehensive treatment method and system
CN115305864A