Road centerline extraction method based on gravitational aggregation algorithm
The mass weight calculation is improved by the gravitational aggregation algorithm, and the road centerline is extracted using vehicle GPS trajectory data. This solves the problems of low efficiency and low accuracy in existing technologies and realizes efficient and low-cost road centerline extraction.
Patent Information
- Application Number
- CN202310260873.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2023-01-31
- Filing Date
- 2023-03-17
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-03-17
AI Technical Summary
Existing road centerline extraction methods based on GPS trajectory data have problems such as high algorithm complexity and average accuracy. In addition, traditional methods require a large amount of remote sensing data support, resulting in high costs and long cycles.
Based on the gravity aggregation algorithm, the calculation method of quality weight is improved, the vehicle GPS trajectory data is used to extract road network information, abnormal points are eliminated, and the offset of the trajectory points is calculated through the gravity aggregation algorithm, and the trajectory points are gradually aggregated to form the road centerline.
It improves the efficiency and accuracy of road centerline extraction, reduces surveying and mapping costs, shortens the extraction cycle, and can extract centerlines from large amounts of GPS trajectory data faster and better.
Smart Images

Figure CN116415134B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic big data applications, and in particular to a road centerline extraction method based on a gravitational aggregation algorithm. Background Art
[0002] With the widespread use of GPS (Global Positioning System) devices and their widespread application in daily life, trajectory data collected by positioning devices is ubiquitous. Trajectory data generated by GPS positioning devices offers advantages such as low cost, rich information, and ease of collection, and has been widely used in various areas of our daily lives. With the rapid development of urban construction, road network information is constantly changing. Traditional road network information extraction technologies, such as surveying and mapping, require significant manpower and resources, and the extraction cycle is excessively long. Vehicle GPS trajectory data has wide coverage, low cost, and a short cycle time. Extracting road network information based on vehicle GPS trajectory data is of practical significance.
[0003] Road centerlines are the most crucial component of electronic road network data. Currently, most road centerline extraction methods rely on remote sensing data and GPS trajectory data. Remote sensing data-based methods are generally implemented through deep learning, resulting in a complex extraction process and requiring extensive remote sensing data. Using GPS trajectory data, Cao et al. introduced the concept of gravity from physics to road network extraction. Based on a large amount of trajectory data, they simulated the effects of potential energy and offset trajectory points of different trajectories on the same road section, causing them to gradually converge toward the road center. Continuous iteration ultimately leads to a stable state, after which sparse points are eliminated, completing the road network extraction. Wu Qunyong et al. improved on Cao's method. To prevent trajectory points from being pulled back and forth by gravity in the direction of travel, which could alter their order, they applied gravity only in directions perpendicular to the direction of travel, simplifying the calculation method. Ma Luyao proposed and compared a road centerline extraction algorithm based on a buffer zone method and a road centerline extraction algorithm based on multivariate adaptive regression splines.
[0004] The main existing methods for intersection extraction based on GPS trajectory data include the following: A buffer-based approach to road centerline extraction, which constructs a buffer of GPS points based on vehicle GPS trajectory data, performs buffer fusion, and simulates a polygonal structure to extract the centerline. A multivariate adaptive regression spline-based road fitting approach, which uses multivariate adaptive regression simulation to construct road centerlines based on vehicle GPS data. A refined road network extraction approach based on trajectory clustering, which clusters trajectories using gravity, but the gravity calculation method only considers the influence of distance, not quality. Intersection extraction methods based on GPS trajectory data suffer from high algorithm complexity and limited accuracy. Summary of the Invention
[0005] The main purpose of the present invention is to overcome the above-mentioned defects in the prior art, propose a road centerline extraction method based on the gravity aggregation algorithm, improve the calculation method of the quality weight, use the GPS trajectory data collected by ubiquitous positioning equipment to extract road network information, and reduce the surveying and mapping costs.
[0006] The present invention adopts the following technical solutions:
[0007] A road centerline extraction method based on a gravitational aggregation algorithm includes the following steps:
[0008] Step 1: Input the GPS trajectory data of the vehicle continuously traveling; wherein the trajectory data is defined as: trajectory set Traj=<s1,s2,...s i ...,s n >, i = 1, 2, 3, ... n, represents a set of n trajectories; one of the GPS trajectories s i ={p1,p2,...,p m ,Cid i}, is a continuous trajectory point, where p represents a GPS point, Cid i The vehicle number of the i-th track is represented by p; GPS point p is described as p i (lgt,ltt,drc,T buf ,N s ), where lgt represents longitude, ltt represents latitude, drc represents the angle between the current driving direction and the north direction in clockwise direction, T buf Represents the similarity point buffer set of GPS points, N s represents the number of similarities;
[0009] Step 2: Calculate the similarity point set of the trajectory points and remove the points with abnormal number of trajectory points; define two GPS positioning points whose distance and heading angle differences do not exceed a certain threshold as similar points, calculate the similarity points of each GPS positioning point, and store the similar points in the GPS positioning point buffer T buf If the number of similar points of a GPS positioning point is lower than the set value, it will be judged as an abnormal point and removed;
[0010] Step 3: For each trajectory point of each trajectory, use the gravitational aggregation algorithm to calculate its offset Δd under the action of similar points, and calculate the coordinates of the trajectory point after offset based on the offset Δd;
[0011] Step 4: Update the coordinates of all trajectory points and calculate the average offset avgDist of all trajectory points. If the average offset avgDist is less than thDist, where thDist is the threshold offset, the algorithm ends. Otherwise, repeat steps 2 to 4.
[0012] Specifically, the gravitational aggregation algorithm is as follows:
[0013] For each trajectory point, take it as the coordinate origin, its heading as the positive direction of the y-axis, and the positive direction of the y-axis rotated 90° clockwise to the positive direction of x, and establish a plane rectangular coordinate system Oxy; let the coordinates of the trajectory point be p i (x i ,y i ), the coordinates of the similar point are p j (x j ,y j ), then the relative coordinates p of the similar point in the plane rectangular coordinate system with the trajectory point as the origin are j ′(x′ j ,y j ′) is obtained by the following formula;
[0014]
[0015] where x i ,y i , θ is the point p to be offset i The original longitude, latitude, and heading angle, x j ,y j , x j ′,y j ′ are the original longitude, original latitude, x-axis coordinate and y-axis coordinate of the similar point of the point to be offset in the plane rectangular coordinate system with the point to be offset as the origin;
[0016] Each similar point has a gravitational offset Δd and a weight ω on the trajectory point, which is calculated as follows:
[0017] Let N pos ,N neg Respectively represent the similar point set in the trajectory point p i (x i ,y i The number of points with positive intercepts and negative intercepts in the rectangular coordinate system with ) as the origin, and the weight ω can be calculated by the following formula:
[0018]
[0019]
[0020] where α j ,φj are distance weight and quality weight respectively, dist ij Represents point p i and point p j The Euclidean distance, N sj Indicates p j The number of similar points, Indicates the point to be offset p i The sum of the number of similar points in the similar point set with positive intercept in the similar point set, taking the distance weight α j and quality weight φ j The average of the gravitational offset weight ω j ;
[0021] Trajectory point p i The offset Δd after the gravitational offset of the similar point i It is obtained by the following formula:
[0022]
[0023] where x i ′ is point p j (x j ,y j ) the x-intercept of the plane rectangular coordinate system with the point to be offset as the origin;
[0024] The offset coordinate p of the trajectory point i ′(x i ′,y i ') is calculated by the following formula:
[0025]
[0026] where Δd x is the trajectory point p i (x i ,y i ) in the x-axis direction, Δd y is the trajectory point p i (x i ,y i ) in the x-axis direction, Δd y Set to 0.
[0027] From the above description of the present invention, it can be seen that compared with the prior art, the present invention has the following beneficial effects:
[0028] The present invention proposes a road centerline extraction algorithm based on gravitational aggregation. By utilizing a large amount of vehicle GPS trajectory data and using a gravitational aggregation method, similar trajectory points are clustered. A quality weight calculation method is improved on the basis of the original algorithm, thereby increasing the algorithm effect and the speed of trajectory iteration aggregation. The method of the present invention effectively solves the problems of low efficiency and low accuracy in extracting road centerlines based on vehicle GPS trajectories. Due to the introduction of quality weights, the number of similar points in the trajectory points is represented as their quality, which greatly improves the convergence speed of each iteration and improves the accuracy of the algorithm. The algorithm can extract centerlines from a large amount of GPS trajectory data better and faster. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A diagram showing the steps of a road centerline extraction method based on a gravitational aggregation algorithm provided by an embodiment of the present invention;
[0030] Figure 2 The results of road network extraction for a portion of the trajectory provided by an embodiment of the present invention; (a) shows the original trajectory and the trajectory after shifting, (b) shows the trajectory after algorithm shifting, and (c) shows the trajectory after outlier removal.
[0031] Figure 3 Results of road network extraction for a portion of the trajectory provided by an embodiment of the present invention; (a) is the original trajectory, (b) is the trajectory aggregated using the gravity aggregation algorithm, (c) is the trajectory after centerline extraction, and (d) is the centerline comparison of the base map using the AutoNavi base map.
[0032] Figure 4 A graph showing the relationship between the number of algorithm iterations and the average offset of a road centerline extraction method based on a gravitational aggregation algorithm provided by an embodiment of the present invention;
[0033] Figure 5 A flowchart of a road centerline extraction method based on a gravitational aggregation algorithm provided by an embodiment of the present invention; DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0035] Example 1:
[0036] See also Figure 1 The present invention provides a road centerline extraction method based on a gravitational aggregation algorithm. The identification process of the extraction method includes the following main steps:
[0037] Step 1: Read in several trajectory data.
[0038] Step 2: Calculate the similarity point set of the trajectory points and remove the points with abnormal number of trajectory points.
[0039] Step 3: For each trajectory point of each trajectory, use the gravitational aggregation algorithm to calculate its offset Δd under the action of similar points and the coordinates of the trajectory point after offset.
[0040] Step 4: Update the coordinates of all trajectory points and calculate the average offset avgDist of all trajectory points. If avgDist < thDist, the algorithm ends, otherwise go to step 2.
[0041] Before formally describing the embodiments, the concepts in the embodiments are first described in detail.
[0042] The definition of trajectory data is: trajectory set Traj=<s1,s2,...,s n >, represents a set of n trajectories. One of the GPS trajectories s i ={p1,p2,...,p m ,Cid i}, is a continuous trajectory point, where p represents a GPS point, Cid i The vehicle number of the i-th track. A continuous track point is a set of positioning points whose adjacent time intervals are within 10 minutes.
[0043] A GPS point p is described as p i (lgt,ltt,drc,T buf ,N s ), where lgt represents longitude, ltt represents latitude, drc represents the angle between the current driving direction and the north direction in clockwise direction, T buf , represents the similarity point buffer set of GPS points, N s Represents the number of similarities.
[0044] The similarity of the trajectory points is defined as: if p j It is p i Similar points, then the distance difference Dist between the two points satisfies ij The distance threshold is less than maxDist, and the heading angle difference is less than the heading threshold R. The heading angle is defined as the angle between the current driving direction and the north direction in a clockwise direction.
[0045] The bus trajectory data of Longyan City, Fujian Province is used as the experimental object, and its data dictionary is shown in Table 1;
[0046] In step 1, read the trajectory format shown in Table 1 and store it in the trajectory set Traj = <s1,s2,...,s n >, each trajectory s iThe format description is the same as above.
[0047] Table 1 Data dictionary for reading data
[0048]
[0049] In step 2, for each trajectory s i For each trajectory point, traverse all trajectory points in all trajectory sets and find the distance difference Dist between the two points. ij Points whose distance is less than the distance threshold maxDist and whose heading angle difference is less than the heading threshold R are regarded as similar points of the trajectory point.
[0050] The minimum number of similar points for each trajectory point is N ths , if a trajectory point fails to meet the threshold condition N s <N ths , indicating that the trajectory point may have offset or the heading angle data is abnormal and should be removed.
[0051] In step 3, for each trajectory point, take it as the coordinate origin, its heading as the positive direction of the y-axis, and the positive direction of the y-axis rotated 90° clockwise as the positive direction of x, and establish a plane rectangular coordinate system Oxy. Let the coordinates of the point to be offset (trajectory point) be p i (x i ,y i ), the coordinates of the similar point are p j (x j ,y j ), then the relative coordinates p of the similar point in the plane rectangular coordinate system with the point to be offset as the origin are j ′(x′ j ,y j ′) can be expressed by the formula
[0052]
[0053] Get. Where x i ,y i , θ is the point p to be offset i The original longitude, latitude, and heading angle, x j ,y j , x j ′,y j ′ are the original longitude, original latitude, x-axis coordinate and y-axis coordinate of the similar point of the point to be offset in the plane rectangular coordinate system with the point to be offset as the origin.
[0054] Each similar point has a gravitational offset Δd and a weight ω on the offset point, which are calculated as follows:
[0055] Let N pos ,Nneg Respectively represent the similar point set to be offset point p i (x i ,y i The number of points with positive intercepts and negative intercepts in the rectangular coordinate system with ) as the origin, and the weight ω can be calculated by the following formula:
[0056]
[0057]
[0058] where α j ,φ j are distance weight and quality weight respectively, dist ij Represents point p i and point p j The Euclidean distance, N sj Indicates p j The number of similar points, Indicates the point to be offset p i The sum of the number of similar points in the similar point set with positive intercept in the similar point set, taking the distance weight α j and quality weight φ j The average of the gravitational offset weight ω j .
[0059] Point to be offset p i The offset Δd after the gravitational offset of the similar point i It can be obtained by the following formula:
[0060]
[0061] where x i ′ is point p j (x j ,y j ) is the x-intercept of the rectangular coordinate system with the point to be offset as the origin.
[0062] The offset coordinate p of the point to be offset i ′(x i ′,y i ′) can be obtained by the formula
[0063]
[0064] Calculated. Where Δd x is the point to be offset p i (x i ,y i ) in the x-axis direction, i.e. Δd i This algorithm only calculates the offset in the vertical heading direction, so Δdy Set to 0.
[0065] In step 4, after completing one offset, the average offset avgDist of the trajectory points of all trajectories is calculated. If avgDist is less than the threshold thDist, the algorithm ends, otherwise go to step 2.
[0066] It is worth noting that in each iteration, the set of similar points of each trajectory point is basically the same as that of the previous iteration, so the step of calculating the similar points of each trajectory point can be put outside the iteration and calculated only once to improve the efficiency of the algorithm. The algorithm flow chart of this process is as follows Figure 5 shown.
[0067] The GPS trajectory data of some buses in Longyan City, Fujian Province are used as experimental objects. The data dictionary is shown in Table 1, and some data are shown in Table 2.
[0068] Table 2 Partial display of read data
[0069]
[0070] Evaluation methods and indicators: The road network extraction evaluation method in this paper starts from qualitative and quantitative evaluation.
[0071] Qualitative evaluation: The extracted road network is basically consistent with the satellite map.
[0072] Quantitative evaluation: This experiment uses part of the OSM vector road network after satellite map comparison as standard data, compares the total mileage difference and trajectory similarity, and compares the algorithm time consumption. osm represents the actual mileage of the road network extracted by the experiment in OSM, and dist represents the total mileage of the road network after extraction by this algorithm; S Dist is the distance similarity, D th is the distance threshold, D i The distance between the node i of the road network extracted by the algorithm and its corresponding OSM road network segment, D i No more than D th , so the distance similarity S Dist The value of is between 0 and 1, and the greater the distance similarity, the better the algorithm effect; S Ang is the heading similarity, θ is the heading difference between the road network node i extracted by the algorithm and its corresponding OSM road network segment, and the value of cosθ is also between 0 and 1. The greater the heading similarity, the better the algorithm effect. sim The similarity between the road network extracted by the algorithm and the road topology vector of the OSM road network. sim The larger it is, the better the road network extracted by the table naming algorithm will be.
[0073] diffDist=|distosm -dist|
[0074]
[0075]
[0076] S sim =λS Dist ×(1-λ)S Ang
[0077] The parameter settings of the present invention are shown in Table 3:
[0078] After repeated experimental verification, the similarity angle threshold R was selected as 8 from 5, 8, and 10. Considering the data compression, 10m was selected as the limit, and the similarity radius threshold maxDist and buffer radius threshold maxDist were selected as 15m and 30m respectively. thDist was set to 0.04. After visual analysis of the experimental results, the minimum number of similar points N that were judged as outliers was determined. ths When it is set to 5, it can ensure that all abnormal points are eliminated. The specific parameter settings are shown in Table 3:
[0079] Table 3 Parameter settings
[0080]
[0081] In order to analyze and verify the effectiveness of the algorithm proposed in this paper, the algorithm in this paper is compared with the following algorithms and the experimental results are compared.
[0082] Multivariate Adaptive Regression Splines (MARS): This algorithm uses the non-parametric nonlinear regression model MARS to adaptively determine the correlation function based on the distribution of data and fit the road centerline.
[0083] Centerline extraction based on buffer method: This algorithm constructs a buffer zone within a certain radius for each trajectory and fuses them, and then uses the horizontal cutting midpoint line method to extract the road centerline skeleton.
[0084] Road network extraction algorithm based on trajectory point aggregation: This algorithm uses the gravitational force of simulated trajectory points and their similar points to continuously iteratively aggregate trajectories, so that similar trajectories gradually converge and aggregate to obtain the center line.
[0085] The road centerline extraction algorithm based on gravity aggregation was used for testing. The algorithm results are as follows: Figure 2 and 3 As shown in Figure 1, it shows the trajectory diagram before algorithm offset, after algorithm offset, and after centerline extraction. Figure 2As can be seen from (a), (b) and (c), the trajectory data preprocessing can effectively remove abnormal positioning points in the trajectory, making the trajectory smooth, and the gravity aggregation algorithm can effectively converge the GPS tracks left by driving on the same route to the center, thereby forming an effective road centerline. Figure 3 (a), (b), (c) and (d) show the original trajectory, the trajectory after gravity aggregation, the road after centerline extraction and the comparison between the centerline road and the Amap map in the road centerline extraction method based on the gravity aggregation algorithm. It can be seen that the effect of the algorithm in this paper is basically consistent with the actual road.
[0086] Table 4 shows a comparison of the computational efficiency and effectiveness of the algorithm before and after optimization. Ite represents the number of algorithm iterations, and avgT represents the average computational time per iteration. Since this algorithm introduces gravitational mass weighting when introducing gravitational aggregation, the original principle of greater distance leading to less gravitational attraction has been changed to a principle where the smaller the number of similar points, the smaller their mass, and the smaller their gravitational attraction. This algorithmic improvement increases the gravitational attraction of denser similar points and weakens the gravitational attraction of outliers, improving the algorithm's effectiveness and convergence speed. Experimental comparisons also demonstrate significant improvements in both effectiveness and efficiency.
[0087] Table 4 Algorithm time comparison
[0088]
[0089] Based on the original road network extraction algorithm based on trajectory point aggregation, the gravity weight formula was improved, and the number of similar points passing through the GPS point was introduced to describe its quality. The relationship between the farther the distance and the smaller the quality, the smaller the gravity weight. After the algorithm was improved, the relationship between the number of iterations and the average offset of the GPS set in each iteration is as follows: Figure 4 As shown in the figure, the algorithm's improvement of adding mass weight to the gravity weight can greatly improve the aggregation speed of GPS trajectories in each gravity iteration algorithm. After about 15 gravity iterations, the average offset reaches the convergence threshold, and the gravity-based aggregation of trajectories can be completed more quickly.
[0090] The present invention proposes a road centerline extraction algorithm based on gravitational aggregation. It utilizes a large amount of vehicle GPS trajectory data and uses the gravitational aggregation method to aggregate trajectory points of similar points. Based on the original algorithm, a quality weight calculation method is improved to improve the algorithm effect and the speed of trajectory iteration aggregation. This algorithm effectively solves the problems of low efficiency and low accuracy in extracting road centerlines based on vehicle GPS trajectories. Due to the introduction of quality weights, the number of similar points in the trajectory points is expressed as their quality, which greatly improves the convergence speed of each iteration and improves the accuracy of the algorithm. The algorithm can extract centerlines from a large amount of GPS trajectory data better and faster.
[0091] The above is only a specific implementation of the present invention, but the design concept of the present invention is not limited to this. Any non-substantial changes to the present invention using this concept shall be deemed as an infringement of the protection scope of the present invention.
Claims
1. A road centerline extraction method based on gravity aggregation algorithm, characterized in that: The following steps are involved: Step 1: Input the GPS trajectory data of the vehicle continuously traveling; wherein the trajectory data is defined as: trajectory set Traj = <s1,s2,...s i ...,s n >, i=1,2,3,...n, represents a set of n trajectories; one of the GPS trajectories s i ={p1,p2,...,p m ,Cid i }, is a continuous trajectory point, where p represents a GPS point, Cid i The vehicle number of the i-th track is represented by p; GPS point p is described as p i (lgt,ltt,drc,T buf ,N s ), where lgt represents longitude, ltt represents latitude, drc represents the angle between the current driving direction and the north direction in clockwise direction, T buf Represents the similarity point buffer set of GPS points, N s represents the number of similarities; Step 2: Calculate the similarity point set of the trajectory points and remove the points with abnormal number of trajectory points; define two GPS positioning points whose distance and heading angle differences do not exceed a certain threshold as similar points, calculate the similarity points of each GPS positioning point, and store the similar points in the GPS positioning point buffer T buf If the number of similar points of a GPS positioning point is lower than the set value, it will be judged as an abnormal point and removed; Step 3: For each trajectory point of each trajectory, use the gravitational aggregation algorithm to calculate its offset Δd under the action of similar points, and calculate the coordinates of the trajectory point after offset based on the offset Δd; Step 4: Update the coordinates of all trajectory points and calculate the average offset avgDist of all trajectory points. If the average offset avgDist is less than thDist, where thDist is the threshold offset, the algorithm ends. Otherwise, repeat steps 2 to 4. The gravitational aggregation algorithm is as follows: For each trajectory point, take it as the coordinate origin, its heading as the positive direction of the y-axis, and the positive direction of the y-axis rotated 90° clockwise to the positive direction of x, and establish a plane rectangular coordinate system Oxy; let the coordinates of the trajectory point be p i (x i ,y i ), the coordinates of the similar point are p j (x j ,y j ), then the relative coordinates p′ of the similar point in the plane rectangular coordinate system with the trajectory point as the origin j (x j ′,y′ j ) is obtained by the following formula; where x i ,y i , θ is the point p to be offset i The original longitude, latitude, and heading angle, x j ,y j , x j ′,y j ′ are the original longitude, original latitude, x-axis coordinate and y-axis coordinate of the similar point of the point to be offset in the plane rectangular coordinate system with the point to be offset as the origin; Each similar point has a gravitational offset Δd and a weight ω on the trajectory point, which is calculated as follows: Let N pos ,N neg Respectively represent the similar point set in the trajectory point p i (x i ,y i The number of points with positive intercepts and negative intercepts in the rectangular coordinate system with ) as the origin, and the weight ω can be calculated by the following formula: where α j ,φ j are distance weight and quality weight respectively, dist ij Represents point p i and point p j The Euclidean distance, N sj Indicates p j The number of similar points, Indicates the point to be offset p i The sum of the number of similar points in the similar point set with positive intercept in the similar point set, taking the distance weight α j and quality weight φ j The average of the gravitational offset weight ω j ; Trajectory point p i The offset Δd after the gravitational offset of the similar point i It is obtained by the following formula: The offset coordinate p′ of the trajectory point i (x′ i ,y′ i ) is calculated by the following formula: where Δd x is the trajectory point p i (x i ,y i ) in the x-axis direction, Δd y is the trajectory point p i (x i ,y i ) in the x-axis direction, Δd y Set to 0.