<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Dec 11, 2013 at 12:18 AM, Petros Apotsos <span dir="ltr"><<a href="mailto:petrosapotsos@gmail.com" target="_blank">petrosapotsos@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div lang="EL" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US">Dear list,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">I am sure this has been answered already, but I am new to this list (and pgRouting altogether) and haven't been able to find a suitable answer. The question is:<u></u><u></u></span></p>

<p class="MsoNormal"><span lang="EN-US">I am using the 2nd version of the function pgr_trsp to do sequential routing between GPS signals on a road network. How can I convert the pgr_costresult to a useful geometry type (LINESTRING would be great)?</span></p>

</div></div></blockquote><div><br></div><div>Hi Petros,</div><div><br></div><div>This chapter in the workshop might answer your question:</div><div><a href="http://workshop.pgrouting.org/chapters/wrapper.html#return-route-with-network-geometry">http://workshop.pgrouting.org/chapters/wrapper.html#return-route-with-network-geometry</a><br>

</div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EL" link="blue" vlink="purple">

<div><p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Bonus questions:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">-What type EXACTLY is the result of this function? Is it a SELECT list? An array?</span></p>

</div></div></blockquote><div><br></div><div>The result type is a "set of records": <a href="http://docs.pgrouting.org/2.0/en/src/common/doc/types/cost_result.html#type-cost-result">http://docs.pgrouting.org/2.0/en/src/common/doc/types/cost_result.html#type-cost-result</a></div>

<div><br></div><div>You can use the result like a SELECT result.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div lang="EL" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">-Why the heck doesn't pgRouting produce (or include respective functions to do so) geometry results, but rather this kind of results. In most cases (if not all) it comes down to actually needing such an output.</span></p>

</div></div></blockquote><div><br></div><div>Because there is such a variety of network data and each data might have different column names, projections, etc.. For Dijkstra algorithm you even don't need a geometry. Your network could be something totally abstract.</div>

<div><br></div><div>So pgRouting tries to make as less assumptions as possible. </div><div>In the previous version there were several "wrapper" functions, but it was extra work to maintain them.</div><div>It's really easy to link your result with the original table, so once you know how it works, you will hopefully agree. ;-)<br>

</div><div><br></div><div>Hope this helped.</div><div>Regards.</div><div>Daniel</div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div lang="EL" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thank you all in advance,<u></u><u></u></span></p>

<p class="MsoNormal"><b><span lang="EN-US" style="font-size:12pt;font-family:Cambria,serif;color:rgb(31,73,125)">Petros Apotsos<u></u><u></u></span></b></p><p class="MsoNormal"><span lang="EN-US" style="font-family:Cambria,serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-family:Cambria,serif;color:rgb(31,73,125)">Rural & Surveying Engineer<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:Cambria,serif;color:rgb(31,73,125)">Technical Chamber of Greece Registry Number 96798<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-family:Cambria,serif;color:rgb(31,73,125)">Τ</span><span lang="EN-US" style="font-family:Cambria,serif;color:rgb(31,73,125)">: 2310 220345<u></u><u></u></span></p><p class="MsoNormal">

<span lang="EN-US" style="font-family:Cambria,serif;color:rgb(31,73,125)">F: 2310 220346<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:Cambria,serif;color:rgb(31,73,125)">Ermou 18A, Postal Code 54624<u></u><u></u></span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-family:Cambria,serif;color:rgb(31,73,125)">Thessaloniki, GREECE<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p></div> <br><br>__________ Information from ESET Smart Security, version of virus signature database 9154 (20131210) __________<br>

<br>The message was checked by ESET Smart Security.<br><br><a href="http://www.eset.com" target="_blank">http://www.eset.com</a><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></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>
</div></div>