1

I'm working with a dataset provided by a third party and have found some lines that fold back on themselves (or in some cases, almost fold back on themselves)

For example, this line folds back over itself multiple times, so I have to delete unnecessary vertices, and sometimes reshape the line to get it to how it should be.

enter image description here

What it should have looked like, without folding over itself.

enter image description here

This one was easy to find, as the bend made it obvious that something wasn't right, however often the lines aren't so easy to spot.

How can I easily find when a line folds back over itself? I think it might fall under topology rules, however I can't find one that seems to fit what I'm looking for. Is there some other workflow or tool available in ArcMap to find these lines so that I can correct them? Currently I'm going through my lines one by one to find and fix them, however there are hundreds of lines to check.

2
  • 1
    Dissolve to single parts using line unique id. Run frequency table and join to original. Each line with frequency >1 is a suspect
    – FelixIP
    Apr 17 at 19:39
  • Thanks @FelixIP that sounds like a reasonable solution too - I might give that a shot
    – Midavalo
    Apr 17 at 23:58

1 Answer 1

1

If you still have access to VBA, then you could script something to find self-intersecting polylines using ITopologicalOperator.ISimple(), or write it in VB .net and create an addin.

There is no equivalent in ArcPy.

If you want to find self-intersecting polylines using Python you need to use the shapely module and is_simple. There are examples on this site.

1
  • "self-intersecting" - I knew I was using the wrong term when I said "folding over" but I couldn't remember the correct one. I'll go back to searching with a more correct term now :)
    – Midavalo
    Apr 17 at 23:57

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.