8

I have a self-intersecting line that I tried to split using the Split Features tool in the Advanced Digitizing Toolbar. The problem is that when I try to split the line at one point, the line splits at every point where it crosses over itself.

This line was originally a tracklog generated in WGS 84 using a Garmin GPS. I imported it into QGIS in GPX format, and saved as a shapefile.

The line is styled with a red marker at the first node. Before splitting at the blue circle: enter image description here

After splitting:

enter image description here

What's going wrong here?

0

3 Answers 3

2

Looks like this is a long-standing bug (since 2011):

https://github.com/qgis/QGIS/issues/14070

https://issues.qgis.org/issues/4087

2
  • Thanks for tracking down the bug report. When I asked the original question here, it didn't even occur to me that it might be a bug. The best workaround I found was buffering the tracklog (which doesn't solve the issue, but it met the specific needs for that project).
    – csk
    Jul 15, 2019 at 21:59
  • I'd love a work around, and the saga tool isn't working for me and the current behavior is costing me hours.
    – user94812
    Jul 19, 2019 at 1:46
1

The saga tool "split lines with lines" in the QGIS processing toolbox can split lines properly even if they have self intersections.

0

If you only have to do this for a limited number of lines, you can:

  1. Enable snapping (Project --> Snapping options --> Snapping on intersection on)
  2. Turn on the Advanced processing toolbar (View --> Toolbars --> Advanced digitizing toolbar)
  3. Use the Split features tool (enter image description here) by drawing a line through the intersection - it will split both strands of the line exactly where it intersects
  4. Select the two strands that you want remerged and use Merge Selected Features (enter image description here)
1
  • 1
    This would be fine for a line with only one or two self-intersections. The problem is that a typical GPS tracklog has tens or even hundreds of self-intersections.
    – csk
    Jul 15, 2019 at 14:06

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.