0

I'm using San Francisco OSM dataset, I want to calculate the optimal path using pgrouting(pgr_astar) The problem that I don't know which column should I use? For example: I want to calculate the optimal path from Cesar Chavez Street to Tewksbury Avenue, which value of wich line should I use as source and target id?

Cesar Chavez Street: enter image description here

Tewksbury Avenue:

enter image description here

For Cesar Chavez Street for example i have 115 street with the same name which one should I use and which value? enter image description here

1

For pgRouting functions you need to use the attributes that define your network topology. The network pgRouting uses has road links (unique id) with start and end node ID's (source and target node), so in your query you probably use those.

osm_id is the original OSM ID, so you have a reference to your original data. The grey column on the left is just a row number of your table viewer, I guess.

  • Thank you for answering. And concerning the lines do you have an idea which of the lines should I use (several lines have the same name as the initial segement as well as the final segement) – Reem Jun 28 '18 at 11:33

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.