# How to find if two gps tracks were from the same trip?

Given I have gps tracks from many users running or hiking, how can I find out who were running together? In other words, which algorithms are there to find out who were in the same party?

Haven't worked much with GIS so I might use the wrong terms. Matching GPS tracks is almost what I want but it doesn't considering time. My own algorithm would be something like: if two tracks are within 10 meters in distance for 50% of the time they are considered traveling together. Of course the actual tolerances might change. That is easy to code but if there are more general algorithms that calculates the total "distance" or correlation between to gps tracks I would like to use those.

• There would be no algorithm. the receivers would likely have separate timestamps on each packet. The tracks may even have different start/end points depending on when the runner started their track. If the timestamps were within 2 mins of each other and with a few hundred feet of the same spot. you might decide for yourself they were running together. But if it is a race and someone is right next to me I wouldn't say they are running with me. This question seems too much opinion based and not really geared for this site. Commented Dec 31, 2014 at 22:52
• Maybe it would help if you can come up with an objective definition of "running together" and "in the same party" we might be able to help. Commented Dec 31, 2014 at 23:05
• Commented Jan 1, 2015 at 1:42
• I'll try to explain a bit more. Haven't worked much with GIS so I might use the wrong terms. Question 81551 is almost what I want but it doesn't considering time. My own algorithm would be something like: if two tracks are within 10 meters in distance for 50% of the time they are considered travelling together. Of course the actual tolerances might change. That is easy to code but if there are more general algorithms that calculates the total "distance" or correlation between to gps tracks I would like to use those.
– Dala
Commented Jan 1, 2015 at 9:04
• @Brad Question 81551 differs in that it does not exploit the time stamps. This is more than "different dimensionality:" it is a fundamental difference that can be exploited to answer the present question. There exist much better methods than simply confounding time with distance as suggested by the current answer here. Commented Jan 3, 2015 at 17:02