I might missing something, but I’m using the matching API to analyze a GPX file.
It perfectly returns a matched route (in the “points” property), but i expect the “snapped_waypoints” property to contain the minimum amount of waypoints necessary to create that route. But it’s always empty.
And the snapped_waypoints are exactly what my user need to edit the imported route. How do I calculate the snapped waypoints for the route?
The reason is basically that this is not yet implemented. But it is also not that easy as often times a corresponding snapped waypoint does not exist as input points can be ignored to improve the matching.
to contain the minimum amount of waypoints necessary to create that route
Even if some algorithm would fill the snapped waypoints it wouldn’t contain the minimum amount of waypoints necessary to create that route.
I have now tried several approaches to solve this problem, but none of the ideas below yield the desired result.
Based on the instructions:
Based on the instructions from the matching call, I placed waypoints on a route before and after each instruction. This resulted in a large number of waypoints in the route, with still some parts not working properly.
Based on a simplify method:
I tried using a simplify method to drastically reduce the number of points in the path from the matching call while maintaining the shape. This resulted in significant deviations in the route.
Both approaches do not lead to a perfect match and also require a large number of waypoints to replicate the route. I.e: Komoot only needs 25% of that waypoints and matches 100%.
Do you perhaps have an idea how to tackle this?