-
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
Intersection Consolidation #31
Comments
This sounds great -- it would be nice to do it after there are tests for respecting turn restrictions, but maybe it would be just as easy to add turn restriction adherance later (if it's not being handled -- haven't gotten that far in testing). |
I never thought of turn restrictions. That's a good idea. I found this page very helpful when I was doing the routing code, have you seeing it? http://wiki.openstreetmap.org/wiki/Routing#Highway-type Right now I have the highway speeds set very arbitrarily (I just picked them), so if this is to be used for realistic routing we might need to look into finding more accurate speed data. Especially because I don't think the speeds translate well to other countries. I picked them to look reasonable for Boston, just as a start/default. |
Thanks for the link -- I hadn't seen at least that section of the page, but I've wondered about speed data. |
I'll try to look into in more, but I think highways speeds might not be realistic within the U.S., either -- no real evidence -- just doing a similar analysis to something I'd approximated with commercial maps before, and it looked like small roads were incurring significantly higher cost using the library. Worth looking into what OSM routers do. |
Yeah, I just guessed these. And I think I might have intentionally differentiated the road styles when I was testing some routing stuff. So it wouldn't surprise me if they're not optimally set yet. |
just for future reference: Project OSRM and Pandana |
Now when a highway is reduced to 0 length, it is deleted in the replaceHighwayNodes! function. Now skip intersection consolidation when intersection has only one associated highway (ends of roads). This prevents the end of a boulevard (such as when cropped) from being joined together. Removed unused clustered_highways variable. Issue #31. Signed-off-by: Ted Steiner <tsteiner2@gmail.com>
Changed type HighwayCluster to HighwaySet. Intersection clustering requires nodes to be in ENU coordinates. Issue #31. Signed-off-by: Ted Steiner <tsteiner2@gmail.com>
…documentation. The list of cluster IDs is no longer returned, since it can easily can be extracted from the intersection ID to cluster ID mapping dictionary. Issue #31 Signed-off-by: Ted Steiner <tsteiner2@gmail.com>
I think it would significantly speed up routing if intersections within a certain radius in a map could be consolidated into a single node.
OpenStreetMap treats divided highways as separate one-way roads. This means that when divided highways cross one another, this results in 4 intersections rather than just 1. If we could represent this as a single intersection, Dijkstra's algorithm would route faster. Also, the intersections found in an environment would be more useful for higher-level tasks, such as displaying directions ("turn left, turn right").
The way to approach this is probably to add a new node in the center of an intersection to the global list of nodes, and replace all nodes within a certain distance of it that belong to highways with references to the new node, instead. These existing nodes shouldn't be deleted, in case we want to do a "refinement" step on the routing, and they should still be used for plotting.
The text was updated successfully, but these errors were encountered: