0

I am doing a project, where I have bunch of GPS points and a database of roads (let's say they are straight line with 2 GPS points) and my task is to snap those points to the nearest road.

I have searched for the solution and found this: Wiki page

But the problem is that it is a solution for normal cartesian coordinates, but I need it to work for geo points. Thanks a lot.

vnkid
  • 308
  • 2
  • 11
  • 2
    How far away are your roads? The Earth isn't flat, but it is *locally* flat, and, unless you have large distances or need extreme precision, you can assume Cartesian coordinates. Also, roads are generally multilines, not a single line, which makes the problem slightly more interesting. –  Aug 01 '17 at 16:18
  • A similar post posted not long ago https://stackoverflow.com/questions/45440700/calculate-distance-to-shore-or-coastline-for-a-vessel – meowgoesthedog Aug 01 '17 at 17:51
  • to barrycarter - yeah, your right. It is not so that far. Because it is a map matching problem, the distance from the point to the road should be in meters (<15m). Maybe I should consider using the cartesian coordinate system. About the road. It should contain multiplelines as you said. I have devide it to sub-roads (edges), so that why I wrote that the roads are single lines. – vnkid Aug 02 '17 at 08:15

0 Answers0