I am trying to create midpoints for a set of polylines in QGIS. My python knowledge is poor and was wondering if there was a plugin that did if for me.
I have tried using the Mean Coordinates function suggested in Creating point to center of polyline? but this returns a centroid which is sometimes off the line (especially when lines are not straight). I am essentially looking for a point that is on the line half way along.
Best Answer
There is a GDAL tool Points along lines (in
Processing Toolbox | GDAL | Vector geoprocessing
).Start this tool, then set the
Distance from line start represented as fraction of line length
parameter to0.5
.This
0.5
, being the fraction, puts a point at the middle of the line. For you most important part of this tool is that the points are placed on the line(s).