I am having a vehicle route with a set of latitude and longitude values. User need travel on the specified route, If user deviates from the route (greater than 100 meters), we need to identify in which point the user moved away from the expected route. The user can again join on existing route after deviation. I need to calculate,

  • How far is the user travelling on the same expected route?
  • How far the user deviates from the expected route?

Is there any approach?

1 Answer 1


I would recommend a two steps approach:

  1. Match the given points to the route (keyword map-matching)
  2. Compute the Euclidean distance between the two sets of points

Now you can select all points within your threshold of 100m. All these points describe the distance of the user travelling on the expected route.

Your second question is already answered with the second processing step.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.