valhalla
valhalla copied to clipboard
trace_attributes: duplicate waypoints trigger edge_index bug
ref. https://github.com/valhalla/valhalla/issues/3371#issuecomment-1205090389
apparently in some situations duplicate waypoints trigger an already solved bug: #3371 . the following request shows it:
curl --request POST \
--url https://valhalla1.openstreetmap.de/trace_attributes \
--header 'Content-Type: application/json' \
--data '{
"shape": [
{
"lat": 57.6512141667,
"lon": 12.0509125
},
{
"lat": 57.6512141667,
"lon": 12.0509125
},
{
"lat": 57.6512141667,
"lon": 12.0509125
},
{
"lat": 57.65126,
"lon": 12.0507619444
},
{
"lat": 57.6512294444,
"lon": 12.0505425
},
{
"lat": 57.6512294444,
"lon": 12.0505425
}
],
"search_radius": 150,
"shape_match": "map_snap",
"costing": "auto",
"format": "osrm"
}'
when the duplicates are removed it works fine. although it's not only duplicates.. if you just remove the middle two it'll also work, although there are only duplicates left. it'll also work if the first or last two are removed, but not if only the first or last.. very strange behavior!