I am building an AI system that generates routes and creates waypoints for navigation.
The problem is that when the AI identifies points along a highway, it often returns nearby locations (addresses, businesses, landmarks, or coordinates near the road) instead of points that are actually located on the highway geometry itself.
As a result:
The generated waypoints are close to the highway but not on it.
When these waypoints are used for routing, the navigation engine may choose different roads or create an incorrect route.
The route becomes less accurate because the waypoints are not snapped to the highway centerline.
My questions are:
What is the best way to generate waypoints that are guaranteed to be on the highway itself?
Should I use road geometry data instead of geocoded locations?
Are there APIs that can snap coordinates to the nearest road segment and return points directly on the road geometry?
How do routing applications generate reliable highway waypoints for long-distance routes?
Is there a standard approach for sampling points from a road polyline rather than using nearby locations?
For example, if a route follows I-80 for 100 miles, I want the generated waypoints to be located on the actual I-80 road geometry, not at nearby businesses, exits, or addresses.
Any guidance or best practices would be appreciated.