5

How to split line objects into segments/multiple objects based on either polygons or lines without creating a new layer?

The problem is clarified in the picture below. I need the green line to be segmented according to the pink lines or green polygons.

enter image description here

1
  • 4
    Why is it so important to not to create a new layer? Basically every semi-automated process in Qgis creates a new (temporary) layer, in order to prevent users from erasing data. You can use the Advanced digitizing tools and separate everything manually, but that can be a lot of work.
    – Erik
    Commented Mar 8, 2018 at 12:48

2 Answers 2

1

As a general rule, to change the layer's geometry without creating a new layer (apart from doing it manually), you can use Edit Features In-Place:

In the Processing Toolbox (Menu Processing -> Toolbox), activate the button Edit Features In-Place. You have then a list of algorithms that can modify the geometries of existing layers (not creating a new layer).

The tool you need is Split with lines.

Be aware that not all algorithms can be used for that and be careful because this overwrites your data. There is a reason why by default, a new layer is created.

Another option might be modifying the layer's geometry with Field Calculator, but in this case, this would be a bit more complex.

enter image description here

0

To split the line without creating another layer you can use the tool "Split Features" . This tool is available in the "Advanced Digitizing Toolbar".

This type of tool is important when you can not, or you do not want to generate another layer, such as when the layer you are working with is stored in a database.

Split features button:

Split features button

Advanced Digitizing Toolbar:

Advanced Digitizing Toolbar

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.