-
Notifications
You must be signed in to change notification settings - Fork 18
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
Distance is understated for routes that have been segmented #63
Comments
Is this true? I thought that during the segmentation the actual road distance was applied as the weight? See here: https://github.com/tedsteiner/OpenStreetMap.jl/blob/master/src/intersections.jl#L55 |
Graphs are constructed correctly, but getting the length of a 'fastest route' is wrong, as is measuring the length of any 'segmented'/'compressed' way yourself. I had meant to get to this or at least brainstorm possible fixes some time ago, but I forgot until @yeesian put together those milestone issues in #62. |
Actually, let me test it again to be sure it's still the case. It's been a while. |
Yes, still an issue. As we calculate distance in the tests: fastest_route, fastest_time = fastestRoute(network, node0, node1)
fastest_distance = distance(nodesENU, fastest_route)
@test length(fastest_route) == 22
@test_approx_eq fastest_distance 724.5817003198007 It calculates Euclidian distance between the nodes that haven't been removed, which is fine in the example we test, but wrong for the fastest_segment_distance, which we don't test. |
Yep, you're right. This is a good catch. Not sure what the best way to fix it is, though... |
I can't look into it right now either, but I marked it for 0.8, just to make sure it doesn't slip through the cracks. |
Because all non-intersection nodes have been removed, and the euclidian distances between remaining nodes are tallied, ignoring curves in the road.
The text was updated successfully, but these errors were encountered: