Skip to content
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

Open
garborg opened this issue Jan 21, 2015 · 6 comments
Open

Distance is understated for routes that have been segmented #63

garborg opened this issue Jan 21, 2015 · 6 comments
Labels
Milestone

Comments

@garborg
Copy link
Collaborator

garborg commented Jan 21, 2015

Because all non-intersection nodes have been removed, and the euclidian distances between remaining nodes are tallied, ignoring curves in the road.

@tedsteiner
Copy link
Owner

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

@garborg
Copy link
Collaborator Author

garborg commented Jan 21, 2015

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.

@garborg
Copy link
Collaborator Author

garborg commented Jan 21, 2015

Actually, let me test it again to be sure it's still the case. It's been a while.

@garborg
Copy link
Collaborator Author

garborg commented Jan 21, 2015

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.

@tedsteiner
Copy link
Owner

Yep, you're right. This is a good catch. Not sure what the best way to fix it is, though...

@garborg garborg added this to the Release 0.8 milestone Jan 21, 2015
@garborg
Copy link
Collaborator Author

garborg commented Jan 21, 2015

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.

@yeesian yeesian added the bug label Feb 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants