<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><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 class="im">
<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">
For datasets as large as the one we are working with, this seems to<br>
result in a pretty high random IO tax.  I wondered if anyone has some<br>
boilerplate modifying the returned route, slicing the nearest ways to<br>
the beginning and end points with ST_ClosestPoint or similar?<br>
</blockquote>
<br></div>
I have done this, it is not that hard.<br>
<br></blockquote><div><br></div><div style>As Steve said, this is not so hard. You can select the closest point on the nearest road segment and PostGIS has all the function to gibe you a substring from that point.</div><div style>

There is an example how to do this with Shooting Star, which has some problems at the moment, but just to get an idea: <a href="https://github.com/pgRouting/pgrouting/blob/sew-devel-2_0/src/common/sql/pgrouting_network_check.sql">https://github.com/pgRouting/pgrouting/blob/sew-devel-2_0/src/common/sql/pgrouting_network_check.sql</a></div>

<div style>Shooting Star routes from road segment to road segment, so the logic is slightly different. For other algorithms such as TRSP you probably need to create a temporary node.</div><div style>So in short, I wouldn't modify the returned route but start from new points.</div>

<div style><br></div><div style>Daniel </div><div><br></div></div><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>