[Qgis-user] Length of lines in polygon depending on attribute
Phil Wyatt
phil at wyatt-family.com
Fri Aug 20 02:48:16 PDT 2021
Hi Roland,
I am assuming measure is a field name so what happens if you try measure=’1’?
Cheers - Phil
From: Qgis-user <qgis-user-bounces at lists.osgeo.org> On Behalf Of Roland Spielhofer
Sent: Friday, 20 August 2021 7:20 PM
To: qgis-user <qgis-user at lists.osgeo.org>
Subject: [Qgis-user] Length of lines in polygon depending on attribute
Hi,
I have a polygon layer and a line layer.
I would like to update a field in the polygon layer with the length of the lines in each polygon that have a certain value in an attribute.
I thought I use the field calculator and the aggregate function but I did not succeed.
What I have now is:
aggregate( layer:='line_layer', aggregate:= 'sum', expression:='length', filter:='measure=1')
which returns NULL
In the line layer there is an attribute 'length' that already holds the length of the element.
I only want the lines that have the attribute "measure=1".
Any help appreciated!
Regards,
Roland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210820/d196eddb/attachment.html>
More information about the Qgis-user
mailing list