Hi Roland,

 

I am assuming measure is a field name so what happens if you try measure=’1’?

 

Cheers - Phil

 

 

 

From: Qgis-user <[email protected]> On Behalf Of Roland 
Spielhofer
Sent: Friday, 20 August 2021 7:20 PM
To: qgis-user <[email protected]>
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

 

 

_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to