How to split line into equal parts in QGIS, with a certain condition: the parts to be between 50m to 150m?

  • 1
    Why is this on hold? It is perfectly clear what is being asked - OP wants to split a line into equal parts. – MappaGnosis Sep 25 '19 at 7:12
  • It is not clear currently, how the length of the parts should be determined. If there is a precondition, it should be described more thoroughly IMO. – Erik Sep 25 '19 at 8:28

You can use Split Lines by Maximum Length in the Processing Toolbox.

An alternative would be to use the QChainage plugin - this will give you a set of points at specified distances along the line. You can then use the points to split the lines with the Saga Split lines with points tool... but that's really a two step equivalent of the above!

With both approaches, while you can control the maximum distance, it is difficult to control the minimum because the algorithm will follow the line and you will get a portion of line left over at the end. If very short lengths are not acceptable, you could use method #1 and instead of a fixed length, supply a formula that accounts for the length of the line - divide the line length by your target subdivision length. Round (floor or ceiling) the result and set the length to the rounded result. The expression can be set using the little button to the right of the "maximum line length entry box. This way you can avoid very short length. It depends on your use-case.

| improve this answer | |

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