A method for binding bus routes and roads based on polar coordinate transformation
By converting the data of bus lines and roads into polar coordinates, and combining feature encoding and similarity algorithms, the problem of directional offset in the binding of bus lines and roads is solved, achieving a more accurate binding effect.
Patent Information
- Application Number
- CN202111408267.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2041-11-19
AI Technical Summary
The existing method of binding bus lines and roads fails to effectively consider the directionality of bus lines, resulting in the easy matching of bus lines to reverse roads in the event of offsets, and the binding between bus lines and roads cannot be accurately completed.
Using a method based on polar coordinate transformation, the accurate binding between bus lines and roads is achieved by converting road and bus line data into polar coordinates, and feature encoding is performed, combining buffer calculation and similarity algorithm.
This method can more accurately deal with ring or arc-shaped roads, reduce the impact of fluctuations in the trace points near the coordinate axis on polar coordinates, enrich the characteristics of the road section, and improve the accuracy of the binding between bus lines and roads.
Smart Images

Figure CN114066088B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of bus route planning, and in particular relates to a bus route and road binding method based on polar coordinate transformation. Background Art
[0002] In real life, bus routes are usually drawn from point data generated by vehicle-mounted positioning devices, while road data used in electronic maps is an abstraction of real roads using GIS and other means. Due to differences in positioning accuracy and abstraction processes, bus route data and road data from various sources usually have a certain degree of offset, which brings great inconvenience to the subsequent calculation of indicators for bus routes and bus networks, and is difficult to meet the needs of subsequent bus network analysis and optimization.
[0003] Conventional adjustment and binding methods include manual adjustment and automatic adjustment. Manual adjustment has high precision but large workload, so automatic adjustment becomes the preferred binding method. Generally, bus line and road binding can be abstracted as line matching problem in GIS, which can be achieved through GIS spatial analysis method. However, this method does not consider the directionality of bus lines, that is, the up and down problems of bus lines. When the line is offset by a certain distance, it is easy to match the bus line to the reverse road.
[0004] In addition, this type of problem can also be abstracted into a trajectory similarity measurement problem, that is, the bus lines on the abstracted road are considered to be two trajectories, and the road sections passed by the bus lines are determined by the trajectory similarity measurement method. Common trajectory measurement methods include Euclidean distance, dynamic time planning, edit distance, longest common subsequence and other methods, among which the longest common subsequence is widely used. For example, Pei Jian et al. proposed a similar vehicle trajectory calculation method based on LCSS in "A similar vehicle trajectory search method based on LCSS"; Chen Shaoquan weighted the trajectory by the length of stay of the trajectory point in "Research on mobile user trajectory similarity query algorithm based on improved LCSS" and then calculated the similarity of mobile user trajectories; and Zhang Ping et al. proposed an algorithm for finding similar trajectories in the field of high-precision map lane generation in "A similar trajectory extraction method based on improved LCSS" by aligning the trajectories and extracting the main direction of the trajectory. However, none of the above can solve complex situations such as bus tracks weaving back and forth on the abstracted road. Summary of the invention
[0005] In view of the defects and problems existing in the current method for binding bus routes to roads, the present invention provides a method for binding bus routes to roads based on polar coordinate transformation.
[0006] The solution adopted by the present invention to solve the technical problem is: a method for binding bus routes and roads based on polar coordinate transformation, comprising the following steps:
[0007] S1. According to the traffic conditions of each road, the one-way road is abstracted into a single line, and the two-way road is abstracted into a double line, and the direction information consistent with the road traffic information is included; at the same time, the bus line is plotted in the order of its up and down stations to obtain the actual driving plotting data of the bus as the bus line;
[0008] S2, based on the bus line busline, a buffer with a distance D is calculated to obtain a surface layer buffer Buffer1;
[0009] S3, superimposing the buffer zone Buffer1 and the road network AllRoads, and taking the roads in the road network that intersect with the line buffer zone Buffer1 as the option roads OptionRoads;
[0010] S4. For each section of the alternative road OptionRoads, i , calculate the buffer to get buffer Buffer2, superimpose the bus line data busline with buffer Buffer2, and select the bus line data BuslinePart in buffer Buffer2 j , get the alternative road and its corresponding bus route OptionRoad i ,BuslinePart j ;
[0011] S5. Extract OptionRoad separately i and BuslinePart j Feature encoding;
[0012] S6, converting the route projection to obtain a projection route, and calculating the similarity S between the projection route and the current candidate road;
[0013] If S>Tv, the alternative route is retained; if S≤Tv, the alternative route is discarded; Tv is the threshold value, which is adjusted according to the actual road conditions;
[0014] S7. Calculate the similarity between the bus line and all the retained candidate routes, and select the road with the greatest similarity as the road that can be bound to the bus line.
[0015] In the above-mentioned bus route and road binding method based on polar coordinate transformation, OptionRoad is extracted in step S5. i and BuslinePart j The feature encoding includes the following steps:
[0016] (1) OptionRoad i and BuslinePart j The line data is equally divided into N parts, and N+1 division points are obtained. The plane coordinates (x i ,y i );
[0017] (2) The plane coordinates (x i ,y i ) is converted into polar coordinates (L, A),
[0018]
[0019]
[0020] (3) With the origin as the center, the line data before coordinate conversion is rotated at multiple angles to obtain new line data;
[0021] (4) According to step (2), the new line is equally divided into N parts to obtain N+1 division points, the coordinates of each division point are recorded, and the plane coordinates of each division point are converted into polar coordinates;
[0022] (5) The distance coordinate L and the angle coordinate A after different angle transformations are combined into the characteristic code of the line.
[0023] In the above-mentioned method for binding bus routes and roads based on polar coordinate transformation, the segmentation method in step (2) can be any one of equal segmentation along the X-axis, equal segmentation along the Y-axis, and equal distance segmentation.
[0024] In the above-mentioned method for binding bus routes and roads based on polar coordinate transformation, in step (3), the line data is rotated m times, each rotation angle is a, and m×a=360°.
[0025] Beneficial effects of the present invention: The present invention performs polar coordinate conversion during the coding process of linear objects, and is more accurate in processing circular or curved roads.
[0026] During the encoding process, the present invention performs a certain amount of angular rotation on linear features, which can enrich the features. This can not only reduce the impact of the fluctuation of the plotted points near the coordinate axis on the polar coordinates, but also use a similarity algorithm based on richer road section features to determine whether the bus route passes through a certain section of road, thereby completing the route binding.
[0027] The present invention forms higher-dimensional data by calculating the distances and angles between multiple points on the road section and the starting point, and can express richer road section information. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1This is an overall flow chart of binding bus routes and roads in the present invention.
[0029] Figure 2 It is the overall and partial map of bus routes and roads.
[0030] Figure 3 Abstract diagram of bus routes and roads, with arrows indicating the direction of the road or bus route. DETAILED DESCRIPTION
[0031] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0032] The present invention provides a method for binding bus routes and roads based on polar coordinate transformation, the method comprising the following steps:
[0033] S1. According to the traffic conditions of each road, a one-way road is abstracted into a single line, and a two-way road is abstracted into a double line, and direction information consistent with the road traffic information is included;
[0034] At the same time, the bus line is mapped according to the order of its up and down stations to obtain the actual driving point data of the bus as the bus line;
[0035] S2, based on the bus line busline, a buffer with a distance D is calculated to obtain a surface layer buffer Buffer1;
[0036] S3, superimposing the buffer zone Buffer1 and the road network AllRoads, and taking the roads in the road network that intersect with the line buffer zone Buffer1 as the option roads OptionRoads;
[0037] S4. For each section of the alternative road OptionRoads, i , calculate the buffer to get buffer Buffer2, superimpose the bus line data busline with buffer Buffer2, and select the bus line data BuslinePart in buffer Buffer2 j , get the alternative road and its corresponding bus route OptionRoad i ,BuslinePart j ;
[0038] S5. Extract OptionRoad separately i and BuslinePart j The feature encoding steps are as follows:
[0039] (1) OptionRoad i and BuslinePartj The line data is equally divided into N parts, and N+1 division points are obtained. The plane coordinates (x i ,y i ); The specific segmentation method may be equal segmentation along the X axis, equal segmentation along the Y axis, equal distance segmentation, etc.
[0040] (2) The plane coordinates (x i ,y i ) is converted into polar coordinates (L, A);
[0041]
[0042]
[0043] (3) With the origin as the center, the line data before coordinate conversion is rotated at multiple angles to obtain new line data;
[0044] (4) Then the new line is divided into N equal parts to obtain N+1 division points, the coordinates of each division point are recorded, and the plane coordinates of each division point are converted into polar coordinates;
[0045] (5) Combining the distance coordinate L and the angle coordinate A after different angle transformations into the characteristic code of the route;
[0046] S6. Calculate the similarity S between the projected route and the current candidate road. The similarity calculation may use methods such as Pearson correlation coefficient, cosine similarity, and L1 / L2 loss.
[0047] If S>Tv, the alternative route is retained; if S≤Tv, the alternative route is discarded; Tv is the threshold value, which is adjusted according to the actual road conditions, and 0.9 is selected this time.
[0048] S7. Calculate the similarity between the bus line and all the retained candidate routes, and select the road with the greatest similarity as the road that can be bound to the bus line.
[0049] Embodiment 2: This embodiment takes specific route data as an example to explain the bus route and road binding method of the present invention.
[0050] For example, the existing line data expression is:
[0051]
[0052] Its starting point is [0,-1].
[0053] The line characteristics are coded for this line, and the specific calculation results are shown in Table 1.
[0054] Table 1 Line feature coding example
[0055]
[0056] The final line segment feature encoding is:
[0057] 1. Distance coding
[0058] [1.0,0.45,0.45,0.61,0.8,1.00,1.00,0.45,0.45,0.61,0.81,1.00,0.45,0.45,0.61,0.80,1.00,1.00,0.45,0.45,0.61,0.80,1.00]
[0059] 2. Angle encoding:
[0060] [4.71,5.18,5.82,6.14,6.26,0.0,0.0,0.46,1.11,1.43,1.55,1.57,1.57,2.03,2.68,3.0,3.12,3.14,3.14,3.61,4.25,4.57,4.69,4.71]
[0061] Get as Figure 3 The abstract results of roads and bus routes are shown. In the figure, routes 1, 2, 3, and 4 represent four alternative roads respectively, and the arrows indicate the directions of the roads or bus routes.
[0062] The angle coding results of bus route points and four alternative roads are shown in Table 2.
[0063] Table 2 Angle coding results of bus route points and four alternative roads
[0064] roadid feature busline 4.71,5.18,5.82,6.14,6.26,0.0,0.v,0.46,1.11,1.43.1.55,1.57,1.57.2.03,2.68,3.0,3.12,3.14,3.14,3.61,4.25,457,4.69,4.71 1 4.71,4.96,5.30,5.70,6.04,0.00,0.00,0.24,0.59,0.98,1.33,1.57,1.57,1.82,2.16,2.55,2.90,3.14,3.14,3.39,3.73,4.12,4.47,4.71 2 1.57,1.33,0.98,0.59,0.24,0.00,314,2.90,2.55,216,1.82,1.57,4.71,4.47,4.12,3.73,3.39,314,0.00,6.04,5.70,5.30,4.96,4.71 3 1.57,1.82,2.16,2.55,2.90,3.14,3.14,3.39,3.73,4.12,4.47,4.71,4.71,4.96,5.30,5.70,6.04,0.00,0.00,0.24,0.59,0.98,1.33,1.57 4 3.14,3.39,3.73,4.12,4.47,4.71,4.71,4.96,5.30,5.70,6.04,0.00,0.00,0.24,0.59,0.98,1.33,1.57,1.57.1.82,2.16,2.55,2.90,3.14
[0065] The Pearson correlation coefficients of busline and the four routes are calculated to be 0.99, -0.03, -0.45, and -0.09. It is easy to know that the road that this bus line should be bound to is road 1.
Claims
1. A method for binding bus routes and roads based on polar coordinate transformation, characterized in that: The following steps are involved: S1. According to the traffic conditions of each road, the one-way road is abstracted into a single line, and the two-way road is abstracted into a double line, and the direction information is included that is consistent with the road traffic information; at the same time, the bus line is plotted in the order of its up and down stations to obtain the actual driving plotting data of the bus as the bus line busline ; S2, based on bus routes busline , calculate the buffer with distance D to get a surface layer buffer Buffer1 ; S3, buffer Buffer1 Road Network AllRoads Overlay and combine the road network with the line buffer Buffer1 Intersecting roads are used as alternative roads OptionRoads ; S4. For alternative roads OptionRoads Each alternative road in OptionRoadi , perform buffer calculation to obtain the buffer Buffer2 , the bus route data busline With buffer Buffer2 Overlay and select the buffer zone Buffer2 Bus route data within BuslinePartj , get the alternative roads and their corresponding bus routes OptionRoadi , BuslinePartj ; S5, extract separately OptionRoadi and BuslinePartj Feature encoding; S6. Convert the route projection to obtain the projection route, and calculate the similarity between the projection route and the current candidate road. S ; like S>Tv , then keep the alternative route; S≤Tv , then the alternative route is discarded; TV is the threshold value, which is adjusted according to the actual road conditions; S7, calculate bus routes busline The similarity with all the reserved alternative routes is calculated, and the road with the greatest similarity is selected as the road that can be bound to the bus route; Among them, in step S5, OptionRoadi and BuslinePartj The feature encoding includes the following steps: (1) OptionRoadi and BuslinePartj The line data is equally divided into N Get N+1 division points, record the plane coordinates of each division point ( xi , yi ); (2) The plane coordinates of each segmentation point ( xi , yi ) into polar coordinates (L, A): ; (3) With the origin as the center, the line data before coordinate conversion is rotated at multiple angles to obtain new line data; (4) Follow step (2) to divide the new line into N Get N+1 divide points, record the coordinates of each divide point, and transform the plane coordinates of each divide point into polar coordinates; (5) The distance coordinate L and the angle coordinate A after different angle transformations are combined into the characteristic code of the line.
2. The method for binding bus routes and roads based on polar coordinate transformation according to claim 1, characterized in that: The segmentation method in step (2) can be any one of equal segmentation along the X axis, equal segmentation along the Y axis, and equal distance segmentation.
3. The method for binding bus routes and roads based on polar coordinate transformation according to claim 1, characterized in that: In step (3), the line data is m Rotation times, each rotation angle is a , m × a =360°.
Citation Information
Patent Citations
Distributing path planning method and device, equipment and storage medium
CN111321898A
Road network and public transport network matching method and system
CN113609241A