3

I'm trying to cut a polygon layer with a line I've created in part by copy-pasting lines from various source shapefiles and in part by hand-drawing segments to connect those.

For clarity, the end goal is to carve out a new polygon from a set of preexisting polygons, where the line I've drawn is part of the border and the shared outline of the original polygons is the other part of the border. I imagine once I cut the original polygons properly, I can simply join the cut bits I want fairly straightforwardly.

Some more info:

  • The line I've drawn is in a MultiLine layer and isn't technically one line, though it could in theory be joined into a single continuous line if I knew how to do that; as it is there's a number of points of overlap and tails off the 'main' line that I'd be happy to do away with
  • This hypothetical continuous line doesn't encircle a polygon (except in one point where the 'main' line I want is one part of the boundary of a polygon I converted to a line); I'd like to use it to cut the set of polygons it's drawn across
  • I've tried the Digitiser Tools Plugin, which other answers claim has a 'cut polygon layer with lines from a line layer' tool; I don't seem to see this option

What sequence of manipulations do I need to do to cut my polygons with this line?

1
  • Please edit your question to include one or more screenshots or drawings that depict your layers and what you want the output to look like. Doing so would help me visualize your situation!
    – Stu Smith
    Oct 27, 2021 at 5:44

1 Answer 1

3

Using "Split with lines" Processing algorithm you can split the Polygon or Lines using another line layer.

It is located in Processing Toolbox > Vector overlay > Spilt with lines (search in the Processing Toolbox Ctrl+Alt+T).

Parameters:

  1. Input layer: polygon layer or line layer
  2. Split layer: Line layer

enter image description here

2
  • Seems like that'll do what I want, thank you! Now I just need to make sure all of my lines actually cross each other properly, which seems to be an issue :P
    – Sjiveru
    Oct 27, 2021 at 19:59
  • Long-delayed question about this, now that I've had a chance to test it - it doesn't seem to work if the lines you're using aren't considered 'the same line'. If you draw two lines across your polygon, which cross each other but neither crosses the whole polygon, the tool will simply not split the polygon at all. What do I need to do to unify those lines?
    – Sjiveru
    Nov 9, 2021 at 22:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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