Question: In QGIS 3.26.3-Buenos Aires, how do I split the lines in a MultilineString ESRI shapefile into a number of segments based on an attribute value that is linked to each line within the shapefile? Each line has a difference attribute value.

Objective: I have a shapefile where the geometry relates to the flights of individual birds. So, there are 118 lines within the shapefile that each represent a single bird flight. I have estimated the height of the bird every 15 seconds during the flight and categorised it into one of 6 height bands. I have calculated the number of 15 second segments in each flight line. By assuming that the bird flew at a constant speed over the total length of the flight, I wish to split each flight line into 15 second segments. This would enable me to calculate how many segments are within a certain area. Alternatively to splitting the line into segments, it would be equally acceptable to use symbology to add equidistant points along each line based on the start/end of each segment (calculated using the segment length).

Within the shapefile, each line has an attribute for:

  • the total length "LENGTH";
  • the number of segments that it should be split into "N_SEGMENTS"; and
  • the length of each segment "SEG_LENGTH".

Please note that I have tried to access the 'split lines by points' feature, as advised elsewhere, but nothing comes up when I search for this within the processing toolbox, so I don't think it's available in my version of QGIS. Also note that I am willing to install and run plug-ins for this task, if applicable.

How can I achieve my objective above?

  • 1
    There is a split lines by maximum length tool in the QGIS tools section and v.split in the GRASS section. There is a split lines by points tool in the SAGA tools section. There are also tools to split by character (QGIS section) and split feature by attribute value (SAGA section) that you might make use of if you set up your attribute table for either.
    – John
    Jan 8 at 19:32

1 Answer 1


Run "Split lines by maximum length" and choose your seg_length field as data defined override (the box right to the parameter; yellow in the screenshot below)

enter image description here

Example; the red line then results in the green line

enter image description here

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.