Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
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.
In tool mean coordinate/s from geoprocessing toolbox use Unique ID field.
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).
Point (-4.28930643 55.86506837)
Required, but never shown