<div dir="ltr">Hi,<div><br></div><div>A recursive CTE query will allow you to walk the network, checking if startPoint/endPoint of lines are connected as you want.</div><div>st_reverse could then be used to correct these lines.</div><div>(<a href="http://blog.cleverelephant.ca/2010/07/network-walking-in-postgis.html">http://blog.cleverelephant.ca/2010/07/network-walking-in-postgis.html</a>)</div><div><br></div><div>Nicolas</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 9 May 2018 at 08:23, aborruso <span dir="ltr"><<a href="mailto:aborruso@gmail.com" target="_blank">aborruso@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I have a simple network like the one on the left side of the image below.<br>
The line directions of the left side are the ones I used to draw the lines.<br>
<br>
Is there in postgis a function (or an extension) that starting from a<br>
network, and choosing a starting point (in the image the red one), is able<br>
to assign/calculate the "right" direction of the network (the one I have on<br>
the right)? <br>
I want to "correct" the directions highlighted in green on the right.<br>
<br>
Thank you<br>
<br>
<<a href="http://postgis.17.x6.nabble.com/file/t378582/7xhDhLj.png" rel="noreferrer" target="_blank">http://postgis.17.x6.nabble.<wbr>com/file/t378582/7xhDhLj.png</a>> <br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://postgis.17.x6.nabble.com/PostGIS-User-f3516033.html" rel="noreferrer" target="_blank">http://postgis.17.x6.nabble.<wbr>com/PostGIS-User-f3516033.html</a><br>
______________________________<wbr>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/postgis-users</a></blockquote></div><br></div>