4

enter image description here

Is there a possibility to get the centroid of each line? When using VECTOR ==> ANALYSIS TOOLS ==> MEAN COORDINATS I always get a centroid of the whole lines. What I need is the centroid of each line without having to select individual lines.

5

In tool mean coordinate/s from geoprocessing toolbox use Unique ID field. enter image description here

enter image description here

4

In the Field Calculator, create a new String field and set the length to be something high like 99. Then use the expression:

geomToWKT( centroid($geometry) )

This should give centroid coordinate values like Point (-4.28930643 55.86506837).

  • @MaFo - Most welcome, glad it was helpful :) – Joseph Mar 29 '17 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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