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?

  • Can you explain this problem a bit better? Do you need multi-modal routing? – dkastl Aug 7 '14 at 21:38
  • Excuse me, does multi-modal routing mean different transport means? If so, it is one of the case. – Harold Chan Aug 8 '14 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 '14 at 7:32
  • how you managed the bus route? – Julio Marins May 25 '15 at 21:54

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, privacy policy and cookie policy

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