Recently did some research about snap-to-road functionality. In this blog post, I will try to share results and compare some edge cases where coordinates are missing or GPS noise is present.
Tech stack: Angular, leaflet with map box map provider.
- Red – actual coordinates
- Blue – Mapbox
- Green – Google
- Purple – Bing
Mapbox only provides snap to closest road and this is clearly visible when we compare with Google and Bing snap to the road with interpolation.
Latitude,Longitude or Longitude,Latitude
This was a long-lasting question and now I know that there is no correct answer.
Latitude,Longitude – Google, Bing
Longitude,Latitude – Mapbox
|Price||10 USD per 1000 requests||2 USD per 1000 requests||Unable to find, need to contact with exact quote.|
|Road selection||Tries to make much more turns and include all original points in the route.||The closest road can be configured with max distance from the point (5-50meters).||Will try to interpolate a straight road and will ignore some coordinates to do so.|
It won’t be fair to compare accuracy, I’m drawing all roads on MapBox tiles.
Bing will try to keep going straight when interpolating, while Google will wiggle around and try to include all points in the interpolated route. This brings to the main difference, Bing is more likely to remove original points to make a route while Google is more likely to add points in between.
There is no winner, this research showed fundamental differences between these providers. Based on the situation all of them are valid options.
Be First to Comment