Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.18k stars 3.28k forks source link

Match service: Leg ending and beginning is overlapping #6722

Open pstidsen opened 8 months ago

pstidsen commented 8 months ago

Hi there,

We are struggling with interpreting the legs in the output from OSRM. Our goal is generally to draw a line with timestamps for each node. To draw the line, matchings[i].geometry.coordinates should be enough. However in order to enrich the coordinates with timestamps we need to use the legs.

I looks like that in a leg with n nodes, there is n-1 distances and durations. I guess duration[0] is the duration between nodes[0] and nodes[1]. However, we have noticed an overlap between the ending of one leg and the beginning of the next one. It appears as though the last two nodes in a leg also appears in the beginning of the next leg. Why is the output like that and how should the distance and duration be calculated in the overlap?

github-actions[bot] commented 2 weeks ago

This issue seems to be stale. It will be closed in 7 days if no further activity occurs.