Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

Thanks.

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

share|improve this question
add comment

3 Answers

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
add comment

https://github.com/pgRouting/pgrouting/wiki/Turn-Restricted-Shortest-Path-(TRSP) Gives me expression that it should be working or experimental option in pgRouting

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.