[GIS] Find the nearest geo point

google mapsroute

I have a gps device that does not output very accurate gps positions.

How can I round those coordonates so that they will match the street course and not buildings etc ?

I want to draw a route on google maps but the line strikes buildings etc. I don't want that i just want a route on the street.

Thanks

Best Answer

What you are searching for is Map Matching. The point is, that you are not "rounding" the coordinates but searching for the nearest point on a street. There is no Google API that offers exactly that, but the Directions API offers a way to calculate a route with given Waypoints.

This Question on Stackoverflow describes a way to do that: https://stackoverflow.com/questions/3404499/plotting-a-route-on-google-maps

I hope this helps, B.