# Divide set of coordinates into sub-sets using intersections with the vector

I'm trying to solve coordinate related problem.

I have a large set of X,Y coordinates (logged by the GPS device during circuit racing, the driver makes 10-20 laps during one racing session) and a vector (a line that marks start/finish of the circuit/lap).

I need to divide large set of coordinates into sub-sets using intersections with the start/finish vector.

How can I solve this problem?

Thank You

-

Are the subsets supposed to be the those of each lap? Note that your coordinates are really (X,Y,t). If you list them in time order, you can just look for pairs where the segment from $(X_i,Y_i)$ to $(X_{i+1},Y_{i+1})$ crosses start/finish. Is that what you are after?