Hi Roger,<div><br></div><div>You're using the "core" function, I think.</div><div>You could use the driving_distance wrapper function, which will return you a polyogon.</div><div>For that you need to load this SQL: <a href="https://github.com/pgRouting/pgrouting/blob/master/extra/driving_distance/sql/routing_dd_wrappers.sql">https://github.com/pgRouting/pgrouting/blob/master/extra/driving_distance/sql/routing_dd_wrappers.sql</a></div>
<div>You can also find it in the directory where the other pgRouting SQL files are.</div><div><br></div><div>The function will take these parameters then:</div><div><br></div><div><div>driving_distance(table_name varchar, x double precision, y double precision,</div>
<div> distance double precision, cost varchar, reverse_cost varchar, directed boolean, has_reverse_cost boolean)</div></div><div><br></div><div>X,Y are the coordinates you take as a center point.</div><div>You can take the returned polygon then and do other spatial queries.</div>
<div><br></div><div>Best regards,</div><div>Daniel</div><div><br></div><div><br><br><div class="gmail_quote">2010/12/22 Roger André <span dir="ltr"><<a href="mailto:randre@gmail.com">randre@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi All,<br><br>I need to generate some maps that show all of the road segments that are within a certain distance of specific points. I have been able to generate some answers using the driving_distance function, but am not sure what to do with them. Here's what I get:<br>
<br><span style="font-family:courier new,monospace"># SELECT * FROM driving_distance('SELECT gid AS id, source, target, length::double precision AS cost FROM edges',49,2000,false,false);</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> vertex_id | edge_id | cost </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">-----------+---------+------------------</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> 15 | 9 | 1854.34547361565</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> 20 | 104 | 1549.85630678904</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> 22 | 68 | 858.367668935802</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> 23 | 125 | 1466.02479201359</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> 24 | 75 | 801.137871846872</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> 25 | 125 | 1169.02817170106</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> 26 | 106 | 1296.98197602289</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> 48 | 71 | 902.595810873304</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> 49 | 106 | 0</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> 51 | 74 | 1948.07551810288</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> 52 | 75 | 1620.93404864578</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">(11 rows)</span><br><br>These answers seem legit, but I'm not sure what to do with them. Ultimately, I need to show both the minimum enclosing polygon that "surrounds" all of the road segments, as well as the road segments themselves. Can someone please give me some pointers as to what I can do to accomplish this?<br>
<br>Thanks,<br><br>Roger<br><font color="#888888">--<br>
</font><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><br clear="all"><br>-- <br><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG & 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>