Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map matching result quality #4285

Closed
amit1rrr opened this issue Jul 13, 2017 · 7 comments
Closed

Map matching result quality #4285

amit1rrr opened this issue Jul 13, 2017 · 7 comments

Comments

@amit1rrr
Copy link

amit1rrr commented Jul 13, 2017

I am evaluating OSRM map matching result. And have some observations to share using which we can improve the quality of the match. In the screenshots you can see input gps points (yellow dots), OSRM matched output (purple line), gmaps snap_to_roads output (green line).

Issue 1: For slightly longer distances OSRM match doesn't seem to interpolate points in between. As you can see there is straight purple line for curved road on right where as nice smooth line for curved road on left. On the other hand gmaps has interpolated points in between for both the curves and has smooth roads. Is there a distance threshold beyond which OSRM considers set of points as 2 separate segments? Can this threshold be configurable?

screen shot 2017-07-13 at 2 07 51 pm

Issue 2: OSRM match just plain removes points sometimes even though they are on road. You can see in the screen shot that 6 points after the turn got removed with match output. The street/way exists in the OSM database. What could be going on here?

screen shot 2017-07-13 at 2 11 07 pm

Any inputs are appreciated. Thanks.

@daniel-j-h
Copy link
Member

You should probably use geojson-tidy to tidy your traces or the tidy=true option when map matching for blob removal (see your first image top right) / resample your data.

You can force osrm not to split using the gaps option when map matching.

Check tidy and gaps here:

http://project-osrm.org/docs/v5.7.0/api/#match-service

And check the splitting implementation here.

@TheMarex
Copy link
Member

@amit1rrr the problem is that you are not using the "interpolated" points but just the matched input points. If you use matchings[i].geometry you will get OSM-level resolution.

@amit1rrr
Copy link
Author

@daniel-j-h
So the tidy definition said,
"Allows the input track modification to obtain better matching quality for noisy tracks."

Currently I set tidy=False because I perform bunch of pre-processing to remove noise from raw recordings. Hence I don't expect OSRM match to remove noisy points or do input track modification but just perform match functionality in order to snap traces onto road. Will still give a try with tidy=true.

Going to also set gaps=ignore as there was about 7 minute time difference in the first issue where it probably split.

I'm still not sure about issue 2 and whether/how split or gaps option would help there.

@TheMarex
I do use interpolated points. I iterate through all 'matchings' and then through all ['geometry']['coordinates'] of each matching, let me know if I am missing something.

@TheMarex
Copy link
Member

@amit1rrr ah, I think passing overview=full might fix your problem. By default the geometry is simplified.

@amit1rrr
Copy link
Author

Going to close this issue. I set tidy=True and it has helped. Setting gaps=ignore or overview=full have both shown regressions in the matching quality in my test suite. ovetrview=full also returns super bloated result, which is probably not needed for our purpose.

We still randomly see some good points on the road being removed by OSRM match. My plan is to fill in these gaps with OSRM route. Will open a separate issue if I face more problems.

@rbhatia46
Copy link

@amit1rrr Can you please tell me how to visualize the output of map matching obtained from the osm backend?
I have installed osrm-frontend but cant seem to figure out how to visualize the output

@nurgasemetey
Copy link

@rbhatia46 Just copy geojson from response and visualize on https://geojson.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants