Hi Pedro,<div><br></div><div>The "core" shortest path function only returns a list of edge id's with costs.</div><div>To include geometry information you need to link again to the original table or just use one of the wrapper functions:</div>
<div><a href="http://workshop.pgrouting.org/chapters/shortest_path.html#wrapper">http://workshop.pgrouting.org/chapters/shortest_path.html#wrapper</a></div><div><br></div><div>Daniel</div><div><br><br><div class="gmail_quote">
On Fri, Mar 16, 2012 at 7:10 PM, Pedro Costa <span dir="ltr"><<a href="mailto:pedrocostaarma@sapo.pt">pedrocostaarma@sapo.pt</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Thanks to Talin and James <span lang="en"><span>but the problem</span> <span>is that</span>
<span>the new table</span> <span>has no</span>
<span>geometry.</span> <span>My</span> <span>difficulty is</span> <span>to give the
table</span> <span>geometry. How I do that?<br>
<br>
thanks</span><span></span></span><br>
<br>
<br>
<br>
<br>
<br>
On 16-03-2012 00:22, James David Smith wrote:
<blockquote type="cite">
<p>Hi,</p>
<p>Unless I'm missing something, you just need to change the first
line to</p>
<p>SELECT * INTO new_table FROM shortest_path( ...... etc.</p>
<p>James </p>
<div class="gmail_quote">On 16 Mar 2012 00:14, "Pedro Costa" <<a href="mailto:pedrocostaarma@sapo.pt" target="_blank">pedrocostaarma@sapo.pt</a>>
wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello to all,<br>
<br>
Can anybody help me to solve this problem:<br>
<br>
I want to create a geometry table with the result of this
query:<br>
<br>
<br>
SELECT * FROM shortest_path<br>
('SELECT gid AS id,<br>
source::int4 AS source,<br>
target::int4 AS target,<br>
lenght::float8 AS cost<br>
FROM passeios',<br>
438,<br>
439,<br>
false,<br>
false)<br>
<br>
someone know how I do that?<br>
thanks<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>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Pgrouting-users mailing list
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a>
</pre>
</blockquote>
<br>
</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><br clear="all"><div><br></div>-- <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>