4

I have the line with calculated length both in meters and in feet.

The problem is, that when I delete some unnecessary nodes it doesn't change at all.

enter image description here

I tried to find some hint here:

Finding line length while editing in QGIS?

but it looks like it applies more to defining the length of the feature instead of auto-changing it.

In my situation, the length has been already calculated, but I need it flexible regarding node editions. Is it possible?

1 Answer 1

6

If you need the line length as an attribute, you should turn to virtual fields. Those update dynamically. Beware that virtual fields are tied to the project, so sharing your file with someone else wont give them the length of the lines.

If this is a matter of labeling, you may use any expression you can use in the field calculator in the labels, too. So e.g. $length||' m' prints the length of the line and the suffix m next to it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.