<font class="Apple-style-span" face="tahoma, sans-serif"><br></font><div><font class="Apple-style-span" face="tahoma, sans-serif"><br></font></div><div>On Fri, Jan 14, 2011 at 5:09 PM, Stephen Woodbridge <span dir="ltr">&lt;<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>&gt;</span> wrote:</div>

<div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On 1/14/2011 6:21 AM, Daniel Kastl wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
        Sorry, I was wrong ... it&#39;s the right function you&#39;re using.<br>
        Somehow read driving directions somewhere before.<br>
        Driving directions does what you need, except that it returns<br>
        you a list of vertices you can reach and the edges column<br>
        doesn&#39;t return anything useful.<br>
<br>
        This custom wrapper function takes the vertices and calculates a<br>
        polygon that contains all of them:<br>
        <a href="https://github.com/pgRouting/pgrouting/blob/master/extra/driving_distance/sql/routing_dd_wrappers.sql#L78" target="_blank">https://github.com/pgRouting/pgrouting/blob/master/extra/driving_distance/sql/routing_dd_wrappers.sql#L78</a><br>


<br>
<br>
    Yes this creates a polygon consisting all vertices but I want to<br>
    display a road network that show how to go from source to outlying<br>
    vertices. Actually I think driving distance&#39;s edge info should give<br>
    that info since it calculates a distance from source. If that<br>
    function know how distant is the vertice it should know the path am<br>
    I wrong on this ?<br>
<br>
    As I wrote, calculating shortest path for each vertex from source<br>
    does not seem feasible. Can we make driving distance to show edge<br>
    info ? I am willing to conribute in that sense but I don&#39;t want to<br>
    redo what is done before.<br>
<br>
<br>
Driving Distance function uses Dijkstra algorithm:<br>
<a href="https://github.com/pgRouting/pgrouting/blob/master/extra/driving_distance/src/drivedist.c#L341" target="_blank">https://github.com/pgRouting/pgrouting/blob/master/extra/driving_distance/src/drivedist.c#L341</a><br>


Dijkstra only goes from vertex to vertex.<br>
<br>
@Anton: do you have some hint?<br>
</blockquote>
<br></div></div>
Daniel,<br>
<br>
This is why we need a function that returns the solved dijkstra tree like:<br>
<br>
node_id, cost, parent_node_id<br>
<br>
for all nodes in the solution. You can then retrieve the edge(parent_node_id, node_id). cost is the accumulated cost to get to node_id from the start node. parent_node_id should be NULL or -1 to indicate the node_id is the start node.<br>


<br>
This allows anyone to do a Dijkstra solution and get back the full results of that solution. One of the goal of pgRouting is to better support arbitrary graph analysis within the database and this would greatly help in this area. We need the high level wrapper functions like we already have because they are convenient, but we currently hide access to the underlying graph solutions so people can not use it to do things like Emre is trying to do.<br>


<br>
Look at the image on my home page: <a href="http://imaptools.com/" target="_blank">http://imaptools.com/</a><br>
<br>
This shows and example of just displaying the polygons, but I was also able to display the roads segments colored the distance ranges. These were NOT done with pgRouting.<br>
<br>
Also if you did a driving distance calculation for say 30 mins and got back the solution above, it would be possible to post process that into multiple 5 min polygons, (maybe that is possible with the current code). There are other useful needs for this kind of data.<br>

</blockquote><div><br></div><div><br></div><div><div><font class="Apple-style-span" face="tahoma, sans-serif">Thats the feature I need and I am sure it will be very useful for a lot of scenarios.  </font><span class="Apple-style-span" style="font-family: tahoma, sans-serif; ">For instance I want to write a partial edge selection for driving distance&#39;s outmost edges. So it will be very easy to do that with the data you mentioned. </span></div>

</div><div><span class="Apple-style-span" style="font-family: tahoma, sans-serif; "><br></span></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
-Steve<div><div></div><div class="h5"><br>
_______________________________________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
</div></div></blockquote></div><br></div>