1

I want to import sevaral gtfs feeds into my postgis/pgrouting database so that I can route over all my gtfs feeds.

The problem is that the sources / destinations ids of my gtfs are likely to conflict.

How can I solve this conflict issue?

  • Add a feed ID for each gtfs feed and then use a compound key: (feed_id, id)? – John Powell Oct 27 '14 at 7:22
  • The problem is not for the id but for the source and target fields. Indeed I want to use this pgrouting function on a single database populated with multiple gtfs feeds but the sources/targets from the different feeds should stay isolated so that two edges from different feeds aren't merged. – Frederic Le Feurmou Oct 27 '14 at 13:50
  • So, given this query, SELECT id, source, target, cost [,reverse_cost] FROM edge_table can you not change it to: SELECT id, source, target, cost [,reverse_cost] FROM (select * from edge_table where gtfs_feed=some_id) then you will only get the nodes and edges for that set. You are providing sql as a paramter, so I would think you could do this. – John Powell Oct 27 '14 at 13:53
  • The thing is that I want to route on all my feeds at the same time. Not only once. – Frederic Le Feurmou Oct 27 '14 at 15:31
  • Run multiple queries at once then, each with a different route id, or change the source code to do what you want :D. – John Powell Oct 27 '14 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.