<font size="2"><font face="tahoma,sans-serif"><br clear="all"></font></font>/emre<br>
<br><br><div class="gmail_quote">On Fri, Jan 14, 2011 at 10:36 AM, Daniel Kastl <span dir="ltr">&lt;<a href="mailto:daniel@georepublic.de">daniel@georepublic.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br><br><div class="gmail_quote"><div class="im">2011/1/14 Emre Koc <span dir="ltr">&lt;<a href="mailto:emrekoch@gmail.com" target="_blank">emrekoch@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<font size="2"><font face="tahoma,sans-serif"><br clear="all"></font></font>/emre<br>
<br><br><div class="gmail_quote"><div>On Fri, Jan 14, 2011 at 10:15 AM, Daniel Kastl <span dir="ltr">&lt;<a href="mailto:daniel@georepublic.de" target="_blank">daniel@georepublic.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<br><br><div class="gmail_quote">2011/1/14 Emre Koc <span dir="ltr">&lt;<a href="mailto:emrekoch@gmail.com" target="_blank">emrekoch@gmail.com</a>&gt;</span><div><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">







<font size="2"><font face="tahoma,sans-serif">Sure</font></font><div><font size="2"><font face="tahoma,sans-serif"><br></font></font></div><div><font size="2"><font face="tahoma,sans-serif">Here is my sql query for that image.</font></font></div>









<div><font size="2"><font face="tahoma,sans-serif"><br></font></font></div><div><font size="2"><font face="tahoma,sans-serif"><div>SELECT edges.gid, ST_AsText(edges.the_geom) AS geotext, </div><div>                 edges.ft_minutes,</div>









<div><span style="white-space:pre-wrap">                </span>edges.meters</div><div><span style="white-space:pre-wrap">        </span>FROM edges,</div><div><span style="white-space:pre-wrap">                </span>(SELECT edge_id, cost FROM driving_distance(&#39;SELECT gid as id,</div>









<div><span style="white-space:pre-wrap">                                </span> source::integer,</div><div><span style="white-space:pre-wrap">                                </span> target::integer,</div><div><span style="white-space:pre-wrap">                        </span>         meters::double precision as cost</div>









<div><span style="white-space:pre-wrap">                                </span>FROM edges&#39;, $startVertexID, $cost,false,false)</div><div><span style="white-space:pre-wrap">                </span>)  as rt </div><div><span style="white-space:pre-wrap">        </span>WHERE edges.gid=rt.edge_id;&quot;;</div>









<div><br></div><div>I just give a sample vertex id and a cost value in meters and got resulting edges. Normally when I find shortest paths all roads are connected so the graph is ok. But this driving directions does not output connected roads, thats the thing I do not understand. </div>







</font></font></div></blockquote><div><br></div></div><div>Driving distance returns you all the vertices you can reach from a start point to within what you have defined as the maximum costs.</div><div>I think you&#39;re looking for another query (Dijkstra, A-Star, Shooting Star).</div>





</div></blockquote><div><br></div></div><div>I am looking for a output that shows road network that I can reach from a start point within a defined maximum cost. So if driving distance does not output connected edges what do you suggest me to do in order to have a connected road network with the given vertices ? Running shortest path for each vertex does not seem feasible but I am unable to see a way to implement it without going inside c functions. </div>



<div>

<div><br></div></div></div></blockquote><div><br></div></div><div>Sorry, I was wrong ... it&#39;s the right function you&#39;re using. Somehow read driving directions somewhere before.</div><div>Driving directions does what you need, except that it returns you a list of vertices you can reach and the edges column doesn&#39;t return anything useful.</div>



<div><br></div><div>This custom wrapper function takes the vertices and calculates a polygon that contains all of them:</div><div><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></div>

</div></blockquote><div><br></div><div>Yes this creates a polygon consisting all vertices but I want to display a road network that show how to go from source to outlying vertices. Actually I think driving distance&#39;s edge info should give that info since it calculates a distance from source. If that function know how distant is the vertice it should know the path am I wrong on this ? </div>

<div><br></div><div>As I wrote, calculating shortest path for each vertex from source does not seem feasible. Can we make driving distance to show edge info ? I am willing to conribute in that sense but I don&#39;t want to redo what is done before. </div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote">

<div><br></div><font color="#888888"><div>Daniel</div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div></font></div><div><div></div><div class="h5"><br>-- <br><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG &amp; Georepublic Japan<br>



eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66, 99, 171)" target="_blank">daniel.kastl@georepublic.de</a><br>Web: <a href="http://georepublic.de/" style="color:rgb(66, 99, 171)" target="_blank">http://georepublic.de</a></span><br>




</div></div><br>_______________________________________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org">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>
<br></blockquote></div><br>