## 2 Proposed Method
### Intersection Points Calculation
#### 2.3.1 Straight-Line Segment Merging
 \tag{4}\]  
By performing a rotation transformation with \(Q\) for each start and end point of the line segment, the two-dimensional common line segment merging problem is converted to a one-dimensional interval merging problem. The merging process can be completed by traversing all line segments in the collinear cluster once; then, each start and end point of the merged one-dimensional line segment is rotated in \(Q^{T}\) to transform back to the original two-dimensional space. Bounding Box and Orthogonal Filtering  
This paper calculates the intersection point of any two straight-line segments that have been merged, using the intersection point as the key point in the intersection area; however, there are two problems with calculating the intersection point directly from the merged straight-line segments: (1) there are still too many straight-line segments to calculate the intersection point, resulting in a large amount of computation; (2) the trajectories of the two straight-line segments may have parallel relationships, resulting in a solution that is not unique or does not exist when calculating the intersection point. In order to solve these two problems, we performed two filtering methods on pairs of straight-line segments--bounding box filtering and orthogonality filtering--to remove most of the pairs of straight-line segments without an intersection relationship in advance. Bounding box filtering. Filter out pairs of straight-line segments for which it is impossible to have an intersection based on two-dimensional spatial relationships. In this paper, an axis-aligned bounding box (AABB) is used for filtering. In two-dimensional space, the axis-aligned bounding box is described as  
\[R=\{(x,y)|x_{\text{min}}\leq x\leq x_{\text{max}},y_{\text{min}}\leq y\leq y_ {\text{max}}\} \tag{5}\]  
where \(x_{\text{min}},x_{\text{max}},y_{\text{min}},y_{\text{max}}\) represent, respectively, the minimum longitude, maximum longitude, minimum latitude, and maximum latitude for the start and end points of a line segment. Straight-line segments may intersect only if their bounding boxes intersect; therefore, to determine whether straight-line trajectory segments intersect, first determine whether the bounding box in which each lies intersects. Given two rectangular bounding boxes, \(R_{A}\) and \(R_{B}\),  
\[R_{A}=\{(Ax_{\text{min}},Ay_{\text{min}}),(Ax_{\text{max}},Ay_{\text{max}})\}\]  
\[R_{B}=\{(Bx_{\text{min}},By_{\text{min}}),(Bx_{\text{max}},By_{\text{max}})\}\]In two dimensions, the condition for the rectangles to intersect must be that they intersect on both of the two axes, as shown in Figure 7.  
Therefore, when there is an intersection of two straight-line segments, the rectangular bounding box corresponding to each of the two straight-line segments should satisfy the condition: \(Ax_{\min}<Bx_{\max}\), \(Bx_{\min}<Ax_{\max}\), \(Ay_{\min}<By_{\max}\) and \(By_{\min}<Ay_{\max}\). We used this condition to quickly filter out a large number of straight-line segments without intersection relationships. Orthogonality filtering. In this paper, it is assumed that the two straight-line trajectories intersecting at the road intersection are approximately perpendicular to each other, so the angle between the direction vectors of the two straight-line segments can be used to further filter the trajectory segments. When the absolute value of the inner product of the unit direction vectors of the two straight-line segments is greater than the orthogonality threshold (0.5), the angle between the two straight-line segments is small (less than 60 degrees) and the intersection calculation of the trajectories of these two straight-line segments can be filtered out directly. The orthogonality filtering not only further reduces the computation of the intersection point of straight-line segments, but also removes straight-line segments that have parallel relationships, thus ensuring the existence and uniqueness of the solution when computing the intersection of straight-line segments.