In a few operations, how can I crop closed paths and have the result be a set of open paths? It's important that the solution be as few operations as possible, and not rely on point and click. (I'm looking for something scalable to perform operations on very complex map images.)
Someone asked the same question here: https://www.reddit.com/r/Inkscape/comments/75xjfa/intersection_with_open_paths_or_equivalent/
The orange area is a closed path that I want to crop to, and the black lines are a bunch of closed paths that I want to be cropped. This is what I want the result to look like:
The lines must be open in the final result. That is, each line is just that - a line with no fill. (Ideally, they'd keep the stroke I've set initially, but not required.)
It's important that this solution applies to much more complex scenarios too. For example, I'd want to crop the lines in this example down to the purple areas:
The images I'm working with are extremely large, and can have thousands of islands to crop out. (Point and click with a mouse to delete paths won't work...)
I'm open to using any software available, but I'd prefer something open source / scriptable. Illustrator or Inkscape would do.