-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null distance and duration but route is exist #5788
Comments
Unfortunately we stumble over this problem again and again. Example: https://router.project-osrm.org/table/v1/driving/8.668085,50.115352;8.669070,50.115570?sources=0&destinations=1&annotations=distance,duration returns zero although the route exists. If you swap the two coordinates OSRM returns a value: https://router.project-osrm.org/table/v1/driving/8.668085,50.115352;8.669070,50.115570?sources=1&destinations=0&annotations=distance,duration |
Looks like a duplicate of #5266. |
It looks like a bug for one-way roads where a source is further down the road than the destination. The route generated for your And it illustrates the problem case quite well: From my understanding of the code, this only occurs when using the MLD algorithm for table generation where a single source or destination is selected. Although not ideal, a temporary solution would be to ensure at least two sources and two destinations are returned and just select the parts of the result you need. I'd need to understand the code a bit better before attempting a fix, but it looks like some additional edge-case handling is needed when the source and destination nodes have this relationship. |
Fixes Project-OSRM#5788 Table queries where source and destinaton are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Fixes Project-OSRM#5788 Table queries where source and destinaton are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Fixes Project-OSRM#5788 Table queries where source and destinaton are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Fixes Project-OSRM#5788 Table queries where source and destinaton are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited at the start, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Fixes Project-OSRM#5788 Table queries where source and destinaton are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited at the start, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Fixes Project-OSRM#5788 Table queries where source and destination are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited at the start, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Fixes Project-OSRM#5788 Table queries where source and destination are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited at the start, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Fixes Project-OSRM#5788 Table queries where source and destination are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited at the start, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Fixes Project-OSRM#5788 Table queries where source and destination are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited at the start, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Fixes Project-OSRM#5788 Table queries where source and destination are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited at the start, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Fixes Project-OSRM#5788 Table queries where source and destination are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited at the start, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Fixes Project-OSRM#5788 Table queries where source and destination are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited at the start, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Fixes Project-OSRM#5788 Table queries where source and destination are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited at the start, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Fixes Project-OSRM#5788 Table queries where source and destination are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited at the start, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
…5828) Fixes #5788 Table queries where source and destination are phantom nodes on the same one-way segment can fail to find valid routes. This is due to a bug in the MLD table generation for the special case where the query can be simplified to a one-to-many search. If the destination is before the source on the one-way segment, it will fail to find a route. We fix this case by not marking the node as visited at the start, so that valid paths to this node can be found later in the search. We also remove redundant initialization for the source node as the same actions are performed by a search step.
Could you explain please why do I get null for distances and durations
https://router.project-osrm.org/table/v1/driving/49.81755316257477,40.39497998078589;49.8177462816238,40.3949953014633?destinations=0&annotations=distance,duration
{ "code": "Ok", "distances": [ [ 0 ], [ null ] ], "durations": [ [ 0 ], [ null ] ], "sources": [ { "hint": "X2UjgP___38IAAAAOwAAAAAAAAAAAAAASVR7QUtutUIAAAAAAAAAAAgAAAA7AAAAAAAAAAAAAADOHAEAcij4AqRhaALRJ_gC5GBoAgAArwfGoB5W", "location": [ 49.817714, 40.395172 ], "name": "Tbilisi prospekti" }, { "hint": "X2UjgP___38PAAAAOwAAAAAAAAAAAAAAmhTlQa2Tm0IAAAAAAAAAAA8AAAA7AAAAAAAAAAAAAADOHAEA8ij4AmVhaAKSKPgC82BoAgAArwfGoB5W", "location": [ 49.817842, 40.395109 ], "name": "Tbilisi prospekti" } ], "destinations": [ { "hint": "X2UjgP___38IAAAAOwAAAAAAAAAAAAAASVR7QUtutUIAAAAAAAAAAAgAAAA7AAAAAAAAAAAAAADOHAEAcij4AqRhaALRJ_gC5GBoAgAArwfGoB5W", "location": [ 49.817714, 40.395172 ], "name": "Tbilisi prospekti" } ] }
According to documentaion it is ok if htere is no route was found, but actually there is route between this points
http://router.project-osrm.org/route/v1/driving/49.81755316257477,40.39497998078589;49.8177462816238,40.3949953014633?steps=true
{"code":"Ok","waypoints":[{"hint":"r1YjgP___38IAAAAOwAAAAAAAAAAAAAASVR7QUtutUIAAAAAAAAAAAgAAAA7AAAAAAAAAAAAAACoHAEAcij4AqRhaALRJ_gC5GBoAgAArwfka4u4","location":[49.817714,40.395172],"name":"Tbilisi prospekti"},{"hint":"r1YjgP___38PAAAAOwAAAAAAAAAAAAAAmhTlQa2Tm0IAAAAAAAAAAA8AAAA7AAAAAAAAAAAAAACoHAEA8ij4AmVhaAKSKPgC82BoAgAArwfka4u4","location":[49.817842,40.395109],"name":"Tbilisi prospekti"}],"routes":[{"legs":[{"steps":[{"intersections":[{"out":0,"entry":[true],"location":[49.817714,40.395172],"bearings":[123]}],"driving_side":"right","geometry":"ytpuFu_aoHJY","duration":0.7,"distance":12.9,"name":"Tbilisi prospekti","weight":0.7,"mode":"driving","maneuver":{"bearing_after":123,"location":[49.817714,40.395172],"type":"depart","bearing_before":0,"modifier":"right"}},{"intersections":[{"in":0,"entry":[true],"location":[49.817842,40.395109],"bearings":[303]}],"driving_side":"right","geometry":"mtpuFo
aoH","duration":0,"distance":0,"name":"Tbilisi prospekti","weight":0,"mode":"driving","maneuver":{"bearing_after":0,"location":[49.817842,40.395109],"type":"arrive","bearing_before":123,"modifier":"right"}}],"weight":0.7,"distance":12.9,"summary":"Tbilisi prospekti","duration":0.7}],"weight_name":"routability","geometry":"ytpuFu_aoHJY","weight":0.7,"distance":12.9,"duration":0.7}]}`The text was updated successfully, but these errors were encountered: