[pgrouting-dev] Dijkstra's solution - How to get tree?

Stephen Woodbridge woodbri at swoodbridge.com
Wed May 5 12:53:05 EDT 2010


Anton Patrushev wrote:
> Hi Steve,
> 
> Can Driving Distance function give you some hints? It is nothing more
> than Dijkstra where a distance (not a target vertex) is a quit
> condition. It returns only vertices, but with some hacking you can
> make it return a tree. I think.
> 
> Cheers,
> Anton.

Hi Anton,

So I'm looking at trunk/extra/driving_distance/sql/routing_dd_wrappers.sql

Am I correct in thinking that if I clone FUNCTION driving_distance() and 
do not call points_as_polygon() that I can basically get that to return 
me the point tuples of the solution which would be:

routing_ld=# \d path_result
Composite type "public.path_result"
   Column   |       Type
-----------+------------------
  vertex_id | integer
  edge_id   | integer
  cost      | double precision

And I assume that parent is source or target which is not vertex_id.


Hmm, but the C code is in $libdir/librouting_dd which is a problem for 
me because I can not get CGAL to load on Debian so I can't load the 
extra stuff.

Argh! and to top things off, I am not familiar with hacking CMake.

Any thoughts or help in simplifying this would be appreciated. It seems 
that boost_drivedist.cpp  and drivedist.c could get moved to core and 
only the CGAL stuff could be left in extra. This would also probably 
mean moving the corresponding parts of routing_dd.sql to core also.

-Steve


More information about the pgrouting-dev mailing list