Hi guys,
I found we have a small ratio of negative values (distances) in table request both in CH
and MLD
algorithms (~0.06% of the points) and fallback_speed
qs doesn't solve it in MLD (it solves null
values but not negative ones)
I have a bunch of examples if you want to have some test cases but you can have this one for now:
/table/v1/driving/51.46926590005908508,35.73502510786056519;51.47071576056222852,35.73375910520553589?destinations=0&generate_hints=false&annotations=distance&fallback_speed=1
and as far as I know, negative values are just in distances not in duration.
P.S: it didn't happen in single routing (/route/v1/driving/
) requests, just in the table. and I have tested it both on v5.18 & v5.20
Here you can see the single route on the map:
route response:
{
"code": "Ok",
"routes": [
{
"legs": [
{
"steps": [],
"distance": 270.3,
"duration": 43.4,
"summary": "",
"weight": 43.4
}
],
"distance": 270.3,
"duration": 43.4,
"weight_name": "routability",
"weight": 43.4
}
],
"waypoints": [
{
"name": "丕讴亘乇蹖",
"location": [
51.470676,
35.733667
]
},
{
"name": "賴賮鬲賲",
"location": [
51.469269,
35.735031
]
}
]
}
table response:
{
"code": "Ok",
"distances": [
[
0
],
[
-216.9
]
],
"sources": [
{
"distance": 0.718917,
"location": [
51.469269,
35.735031
],
"name": "賴賮鬲賲"
},
{
"distance": 10.830096,
"location": [
51.470676,
35.733667
],
"name": "丕讴亘乇蹖"
}
],
"destinations": [
{
"distance": 0.718917,
"location": [
51.469269,
35.735031
],
"name": "賴賮鬲賲"
}
]
}
@AliKarami I can confirm I see the same thing - I grabbed a small extract from OSM around the coordinates you supplied and ran the same query with master
- I get the same negative value. Stay tuned, I'll look into it.
Found the bug - fix over in https://github.com/Project-OSRM/osrm-backend/pull/5315. I'll finish this up on Monday and get it included in 5.21.0, which I plan to release early next week.
Fixed in master
by https://github.com/Project-OSRM/osrm-backend/pull/5315
Most helpful comment
Found the bug - fix over in https://github.com/Project-OSRM/osrm-backend/pull/5315. I'll finish this up on Monday and get it included in 5.21.0, which I plan to release early next week.