dijkstra (#16) - Difference between dijkstra_sp and shortest_path (#91) - Message List

Difference between dijkstra_sp and shortest_path

Dear forum, meanwhile I`m getting deeper and deeper in the materie. I`m working with MapServer and PHP Mapscript. With no problem I get a route visualized using a string like "$sql="the_geom from (SELECT gid, the_geom from ".

"dijkstra_sp('fridastreets',".$start.",".$end.")) as g using unique gid using srid=-1";"

But I wonder: If it`s possible to visualize a route by this function for what do we need then the Function "shortest_path". Here http://pgrouting.postlbs.org/wiki/Dijkstra it`s wirtten that this function is used for Dijkstra-routing.

And how dows that dijkstra-function get`s input from C/C++ (as written here: http://pgrouting.postlbs.org/discussion/13/9)?

Thanks again, Kai

  • Message #340

    Hi Kai,

    If you look at the 'dijkstra_sp' function's source code, you'll see that it is using 'shortest_path' function. The main purpose of 'dijkstra_sp' function is to visualize a result of 'shortest_path' function.

    • Message #342

      All right. Now I see. Thnk you very much, Kai