[postgis-users] Build direction in a network, only from a starting point

Nicolas Ribot nicolas.ribot at gmail.com
Wed May 9 00:58:16 PDT 2018


A recursive CTE query will allow you to walk the network, checking if
startPoint/endPoint of lines are connected as you want.
st_reverse could then be used to correct these lines.


On 9 May 2018 at 08:23, aborruso <aborruso at gmail.com> wrote:

> Hi,
> I have a simple network like the one on the left side of the image below.
> The line directions of the left side are the ones I used to draw the lines.
> Is there in postgis a function (or an extension) that starting from a
> network, and choosing a starting point (in the image the red one), is able
> to assign/calculate the "right" direction of the network (the one I have on
> the right)?
> I want to "correct" the directions highlighted in green on the right.
> Thank you
> <http://postgis.17.x6.nabble.com/file/t378582/7xhDhLj.png>
> --
> Sent from: http://postgis.17.x6.nabble.com/PostGIS-User-f3516033.html
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20180509/213b2340/attachment.html>

More information about the postgis-users mailing list