[postgis-users] Cumulative sum

Delton Moraes deltoncm at yahoo.com.br
Tue Feb 5 09:47:57 PST 2013


Hello.
 
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?
 
Thanks.
 
Delton
Moraes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130205/f6b983fc/attachment.html>


More information about the postgis-users mailing list