Greetings to Everyone!
I have been pondering on this for a couple of days, was hoping someone can point me in the right direction:
I have a table with station links:
stationID
lineID
I want to generate station pairs between all connected stations. Stations will be connected in two cases.
- if they have same lineID (i.e. they are directly connected)
- if lines intersect (lines intersect if they have any common stations).
How would I do this? Thanks in advance for your input and ideas!