<div dir="ltr">Hi Andrew,<div><br></div><div>Once I had to route to every point in a virtual raster, which makes sure, that there is a node every few hundred meters.</div><div>The first step was to create raster nodes. Then you query for the nearest edge of each raster node.</div><div>When you know the edge you can create a link between the raster point and the source and target of this edge and assume some costs to reach the raster node.</div><div><br></div><div>Here is a picture, how it would look like:</div><div><br></div><div><img src="cid:ii_j73ddaew0_15e42dec1095274e" width="563" height="375"></div><div><br></div><div>You could also move the raster nodes onto the nearest edge.</div><div>Not sure, if this is useful for your use case, but I thought I share it.</div><div><br></div><div>Best regards,</div><div>Daniel</div><div><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 2, 2017 at 10:38 PM, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div class="m_7680268830218684329moz-cite-prefix">Hi Andrew,<br>
<br>
This is a really good question it gets asked every so often. So I
will cc the pgRouting-users list with my response.<br>
<br>
The routing algorithm computes the cost to get to each node
following the road network. If the cost is time based then it
takes the speed of the road segments into account. You can't do
meaningful interpolation between points without taking into
account the edges. Think about a path following the letter "S" or
"C", interpolation between the end points does not take into
account the path of the letter or in our case the roads. Also if
you pick two arbitrary nodes they may or may not be connected
directly. So interpolation is not going to make sense.<br>
<br>
One option might be to examine each edge, and get the values of
the their respective nodes, then interpolate along the edge and
add the interpolated points into a temporary table, then you can
union the original points plus the interpolated points into
pgr_pointsAsPolygon()<br>
<br>
Another solution that might work for you if you need better
resolution but this would be the same as above and require more
work, would be to take every edge and break it into 4 equal edges
and replace the original edge so that instead of having one edge
and 2 node, you now have 4 edges and 5 nodes. Then you can rebuild
the topology and your driving distance will have a high density of
node.<br>
<br>
I hope this helps,<br>
-Steve<br>
<br>
On 9/1/2017 10:52 AM, Andrew Wooley wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Stephen
<div><br>
</div>
<div>I attended your workshop at the FOSS4G Boston conference. I
really enjoyed it and learned a lot. I have been working on
some projects using it.</div>
<div><br>
</div>
<div>I came across an issue that I was hoping that you could
help me. I am using the following example function from
Regina's workshop:</div>
<div><br>
</div>
<div>
<div>SELECT </div>
<div> 1 As id, </div>
<div> ST_SetSRID(</div>
<div> pgr_pointsAsPolygon(</div>
<div> $$</div>
<div> SELECT D.seq AS id, ST_X(V.the_geom) AS
x, ST_Y(V.the_geom) As y </div>
<div> FROM </div>
<div> pgr_drivingDistance(</div>
<div> $sql$</div>
<div> SELECT gid As id, source,
target, length_m AS cost, length_m AS reverse_cost FROM
osm_ways</div>
<div> $sql$,</div>
<div> (SELECT id FROM
osm_ways_vertices_pgr N ORDER BY N.the_geom <->
ST_SetSRID(ST_Point(-111.<wbr>69429,40.28984),4326) LIMIT 1), </div>
<div> 500, </div>
<div> TRUE</div>
<div> ) D INNER JOIN </div>
<div> osm_ways_vertices_pgr V ON D.node =
V.id</div>
<div> $$</div>
<div> ),</div>
<div> 4326</div>
<div> ) As the_geom</div>
<div>;</div>
<div><br>
</div>
<div>It is selecting the vertices in the table and the
creating the polygon. It works well, but I was wondering if
there was a strategy for interpolating points along the line
to make the distance be the input distance between vertices
even if there isn't a vertex there in the table.</div>
<div><br>
</div>
<div>Thanks a lot for your help.</div>
<div><br>
</div>
<div>
<div class="m_7680268830218684329gmail_signature">
<div dir="ltr"><b><font face="'trebuchet ms', sans-serif"><font color="#000099">Andrew Wooley</font></font></b><font face="'trebuchet ms', sans-serif"> |</font><font color="#999999"><font face="'trebuchet ms',
sans-serif"> IT Director</font></font></div>
<div dir="ltr">
<div><font><font><font color="#006600"><font face="'trebuchet ms', sans-serif">Mountainland
Association of Governments</font></font></font></font></div>
<font face="trebuchet ms, sans-serif"><a href="https://www.google.com/maps/place/40%C2%B018%2741.0%22N+111%C2%B040%2755.0%22W/@40.3112687,-111.68232,19z/data=%214m2%213m1%211s0x0:0x0" target="_blank">40.311,-111.682</a></font><br>
<div><font><font face="'trebuchet ms', sans-serif"><a href="http://www.mountainland.org" target="_blank"><font color="#666666">http://www.mountainland.org</font></a></font></font></div>
<div><font><span><font color="#666666">801-229-3844 </font></span></font></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<p><br>
</p>
<div id="m_7680268830218684329DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top:1px solid #d3d4de">
<tbody><tr>
<td style="width:55px;padding-top:13px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width:46px;height:29px"></a></td>
<td style="width:470px;padding-top:12px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link" style="color:#4453ea" target="_blank">www.avast.com</a>
</td>
</tr>
</tbody></table><a href="#m_7680268830218684329_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></div>
<br>______________________________<wbr>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.<wbr>org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/pgrouting-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/pgrouting-<wbr>users</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><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="https://georepublic.info" target="_blank">https://georepublic.info</a></span><div><br></div><div><br></div><div><br></div></div></div></div></div>
</div>