Feature request #11515

Use ogr2ogr to create midpoints along lines

Added by Filipe Dias over 9 years ago. Updated almost 9 years ago.

Assignee:Giovanni Manghi
Pull Request or Patch supplied:No Resolution:fixed/implemented
Easy fix?:No Copied to github as #:19785


Following this blog post by Darren Cope, I found it is possible use ogr2ogr to create midpoints along a line using ogr2ogr. For example:

ogr2ogr OutputPoints.shp InputLines.shp -dialect sqlite -sql “SELECT AsText(Line_Interpolate_Point(InputLines.geometry, 0.5)),OTHER,FIELDS,CAN,GO,HERE from InputLines”


It would be a valuable addition to Processing, since there's not equivalent algorithm available


#1 Updated by Giovanni Manghi over 9 years ago

  • Assignee changed from Victor Olaya to Giovanni Manghi

#2 Updated by Andreas Neumann over 9 years ago

Do you actually want new point geometries or is it just necessary for symbology? In the latter case, there is the marker line in QGIS, by which you can position a marker on the mid-point of a line (term is "central point").

#3 Updated by Filipe Dias over 9 years ago

In this case, the actual geometries. In ecological surveys, it is quite common to plan surveys along line transects and to collect data in the middle, first or last quarter of the transect. This tool would be useful for that.

#4 Updated by Giovanni Manghi almost 9 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

already implemented.

Also available in: Atom PDF