<div dir="ltr"><div class="gmail_default" style="font-family:pmingliu,serif;font-size:large">Thank you for your helpful suggestion!<br>I have used pgRouting algorithm to do this, and got the product I want.<br></div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-24 21:53 GMT+08:00 陳彥文 <span dir="ltr"><<a href="mailto:r01622040@ntu.edu.tw" target="_blank">r01622040@ntu.edu.tw</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_default" style="font-family:pmingliu,serif;font-size:large">Thank you for your helpful suggestion!<br>I have used pgRouting algorithm to do this, and got the product I want.</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">2014-04-18 21:22 GMT+08:00 Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span>:<div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 4/18/2014 6:35 AM, Heinz Chen wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
Hello, guys, I don't know how to use pgRouting and driving_distance to<br>
do this special routing, the details I have posted in this forum,<br>
<br>
Use PostgreSQL to route in different style<br></div>
<<a href="http://stackoverflow.com/questions/23098554/use-postgresql-to-route-in-different-style" target="_blank">http://stackoverflow.com/<u></u>questions/23098554/use-<u></u>postgresql-to-route-in-<u></u>different-style</a>><div>

<br>
<br>
Can I just achieve this goal just using pgRouting and driving_distance?<br>
Or is there another way to do this?<br>
Please give me some hint to begin with and feel free to give me any<br>
suggestion, thanks!<br>
</div></blockquote>
<br>
I looked at your question and I don't think you can do it with the existing driving distance code. You might be able to modify the existing code to get it to do what you want. The way the code works is this:<br>
<br>
1. we build a graph from the edges<br>
2. we solve the graph using dijkstra's algorithm based on the start node<br>
3. this creates a tree off shortest paths with the start node the root of the tree<br>
4. we walk the tree summing the edge lengths from the root to each node and emit all the nodes.<br>
<br>
<br>
For your case you would what to change step four generate a product of the edge lengths. I looked briefly at the code but could not spot where the cost summing was happening, but it should be reasonable obvious.<br>
<br>
If you don't need all cost to all nodes, ie the cost from the start to a specific end node then you can use pgr_dijkstra and that will return all edges for that shorest path and then you can generate the product from that.<br>


<br>
-Steve<br>
<br>
______________________________<u></u>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a></blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br>
<br clear="all"><div><br></div>-- <br><div dir="ltr">
<div><font size="4" face="pmingliu, serif">生工所 r01622040 陳彥文</font></div></div>
</font></span></div>
</blockquote></div><br></div>