4

Let say I have route 1 from A -> B -> C, route 2 from C -> B -> D,

how can I write SQL for pgRouting which can let me have the result route 1 -> route 2 when I want to get the shortest path from A to D?

Or should I just use Neo4j or other server side solutions in this case?

4
  • Can you explain this problem a bit better? Do you need multi-modal routing?
    – dkastl
    Aug 7, 2014 at 21:38
  • Excuse me, does multi-modal routing mean different transport means? If so, it is one of the case. Aug 8, 2014 at 1:03
  • 1
    At the moment pgRouting does not have a working multi-modal function unfortunately. Multi-modal takes into account the time tables: github.com/pgRouting/pgrouting/wiki/…
    – dkastl
    Aug 8, 2014 at 7:32
  • how you managed the bus route? May 25, 2015 at 21:54

1 Answer 1

1

You can do it by creating dummy link over your city network to represent the bus route, then asign those link a different speed and can increase cost forr normal link to give preference to bus. Then you connect bus stop with city network and algorithm can change between different bus routes.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.