<div dir="ltr">Hi,<div><br></div><div style>You may look at Recursive Common Table Expression (<a href="http://www.postgresql.org/docs/current/static/queries-with.html">http://www.postgresql.org/docs/current/static/queries-with.html</a>)</div>
<div style>It is very powerful to walk a network.</div><div style><br></div><div style>Nicolas</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 5 February 2013 18:47, Delton Moraes <span dir="ltr"><<a href="mailto:deltoncm@yahoo.com.br" target="_blank">deltoncm@yahoo.com.br</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:10pt;font-family:arial,helvetica,sans-serif"><div><div class="MsoNormal">Hello.<u></u><u></u></div>


<div class="MsoNormal"><u></u> <u></u></div>

<div class="MsoNormal"><span lang="EN-US">I need to
build a view that contains data of accumulated contribution to the sewage
network (linestrings). Each section of the sewer system has its own
contribution. I need a function (i think this is the only way to solve this,
but if have another way, please tell me) to calculate that cumulative
contribution. The function would have to add cumulative values of the
contributions of previous linestrings to the local contribution (WHERE
st_touches(st_startpoint(sewer1.geom), st_endpoint(sewer2.geom)) until the
“end” (the top/start of sewage network, where don’t have another previous
linestring. I think a WHILE solve this, but how?). Can anyone help me?<u></u><u></u></span></div>

<div class="MsoNormal"><span lang="EN-US"> </span></div>

<div class="MsoNormal"><span lang="EN-US">Thanks.<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></div><span class="HOEnZb"><font color="#888888">

<div class="MsoNormal"><span lang="EN-US"> </span></div>

<div class="MsoNormal"><span lang="EN-US">Delton
Moraes<u></u><u></u></span></div></font></span></div></div></div><br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div>