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

Find intersections between routes/segments #9

Open
matt-wallis opened this issue Mar 2, 2017 · 0 comments
Open

Find intersections between routes/segments #9

matt-wallis opened this issue Mar 2, 2017 · 0 comments

Comments

@matt-wallis
Copy link
Contributor

The is necessary in order to be able to discover how to go from A to B where A is on one segments, and B on another. i.e. it is needed for journey planning.

Implementation

Use a line-sweeping algorithm to find the intersections of all line segments. If we can't find an existing javascript implementation, then the following paper looks as if it describes a suitable algorithm:
Bartuschka, U.; Mehlhorn, K.; Näher, S. (1997), A robust and efficient implementation of a sweep line algorithm for the straight line segment intersection problem.
This may require that we also have a library for arbitrary precision arithmetic -- look at mathjs.

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