Hi,

You can use something like

SELECT areas.id, SUM( ST_Length( lines.geometry) ) FROM lines,areas WHERE ST_Intersects(lines.geometry,areas.geometry) GROUP BY areas.id ;

Greetings,

Denis

On 07/03/2012 01:36 PM, Matej Mailing wrote:
Hi all,

We have a layer that contains polygons and another that contains lines
that lie on them. Parts of the lines are laying "inside" the polygons
and I would like to get a sum of all the lengths of lines that lie on
the polygons. What is the easiest way to achieve this?

TIA,
Matej
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to