1

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

closed as unclear what you're asking by ahmadhanb, LaughU, Fran Raga, HDunn, TomazicM Sep 23 at 10:19

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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 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 at 8:28
1

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.

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