# Distance metric for sequential spatial data (routes navigated in 2d space)

I'm looking for a distance metric to compute how close certain paths taken by people navigating throughout a city are to a set of 'correct' routes.

I have path recordings for some 'correct' routes throughout a city. I also have path recordings for users navigating the same city. Each recording consists of rows of sequential X and Y coordinates. There is some variability in when X and Y locations were sampled, so there is not a one-to-one correspondence between rows in different recordings. Recordings are also of variable length.

Any suggestions on how best to estimate how close the routes taken by people were to my pre-recorded correct routes? I'm not fussed about time differences, so taking the exact same route but faster would not be distant.

• The answer ought to depend on what use you will make of this "closeness:" what is the purpose of your analysis and how do you intend to interpret these values? – whuber Aug 12 at 12:26

If you are not working with graph structured data explicitly (though you should think about it since moving along roads/paths in a city is not the same as moving freely around $$\mathbb{R}^2$$) then you can do a similar trick integrating some measure of distance between points for every point on the path.