Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following situation:

I want to find the shortest route from A to B through nodes (C,D,E, etc.) with turn directions and road type filtering.

Is there a way to accomplish this using pgRouting? Has anyone done this? I haven't begun developing anything yet, I'm just trying to find out if pgRouting is the way to go.


Update: The algorithm should determine the order of nodes (C,D,E, etc.)

share|improve this question

I don't think there is a direct way to calculate routes via in-between nodes in pgRouting. You could try to calculate routes from A to C, A to D and so on and write an algorithm yourself using the Dijkstra shortest route algorithm.

Turn directions are not possible (as far as I know), but road type filtering can be done using a condition in the WHERE clause.

share|improve this answer

In case you still looking for more alternatives, there is another excellent (and fast) package out there called osrm that deserves some attention. I just found it myself, the code can be found on github

share|improve this answer

Turn-Restricted-Shortest-Path-(TRSP) Gives me expression that it should be working or experimental option in pgRouting

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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