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

link_nearby_stops() in graph compiler: Improve bounding #7

Open
abyrd opened this issue Aug 7, 2009 · 1 comment
Open

link_nearby_stops() in graph compiler: Improve bounding #7

abyrd opened this issue Aug 7, 2009 · 1 comment

Comments

@abyrd
Copy link
Contributor

abyrd commented Aug 7, 2009

The link option currently links each station to all other stations within a hardcoded 0.05 degrees. This can make a huge number of links with lengths farther than most people would walk, enough to exceed physical memory and swap to a grinding halt.

This 0.1 degree 'square' bounding box can be quite large, and is not really square since longitude lines converge toward the poles. A more appropriate goal would be to link to all other stations within a radius of x meters.

Bounding box range could be a command line parameter, or better yet have both a lat and long component derived from a walk radius (itself a command line parameter) and a geographic location (either the centroid of all stops, or at each stop individually). In the iteration over all candidate stops within the bounding box, check if the 'obstructed' distance 'dd' is < x meters before deciding whether to link or not.

The bounding box specified in degrees must be bigger than x meters at the stop's geographic position.

Also:
For a stop A (outer loop) and a candidate stop for linking B (inner loop), this function creates both edges A->B and B->A. However, the outer loop is iterating over all stops, so B->A would be created
anyway. Is this redundant or am I missing something?

@abyrd
Copy link
Contributor Author

abyrd commented Aug 9, 2009

Fixed in andrewbyrd/graphserver.
Observations posted on graphserver wiki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant