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 would like to know what is the difference between A* algorithm and Dijkstra at finding the shortest path at pgrouting.

Which one is faster ,has better performance and returns better results.

Also i would like to know if it is possible for pgrouting to take into account that a road is one way when it computes the shortest path thus not traversing it

Sorry for my english thanks in advance john

share|improve this question
    
add comment

1 Answer 1

up vote 1 down vote accepted

A* is a generalised form of the Dijkstra search algorith. There are good descriptions of both on Wikipedia (A*, Dijkstra) including nice graphical representations.

Essentially A* is faster, and will find the "best" solution given some reasonable assumptions. Dijkstra (i.e. A* without heuristic) is better conditioned. I usually choose Dijkstra until the problem space grows too large and I need something faster.

For the one-way question, just see the documentation on this aspect of pgRouting.

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.