When I downloaded the BBS route shape file (apologies for not linking, I’m not sure if it’s publicly available) I had some work to do. I wrote down the steps I used in cleaning up the layer, and then splitting into fifths.
- One line per route. Great! set aside. (Still a note of caution, some BBS routes are too long. When I asked about this, I was told they were digitization errors but weren’t immediately fixable.)
- More than one line per route: I needed to only be sure to dissolve segments with matching route identifiers that touched. This is where iterative spatial joins and dissolves came in…
- spatial join: what is touching each segment?
- do the route identifiers match? if so, keep those…get rid of the ones that don’t
- join field to get the target ID’s, which end up making “connectivity groups,” to dissolve by
- repeat steps in #2 until there’s only one poly-line per connectable (zero distance) route parts
- this leaves disconnected fragments of things that don’t touch (decide what to do with those on a case-by-case basis)
Now, you might want to look at the lengths of the resulting routes and examine ones that are suspiciously long, and decide what to do with them in your analysis.
- depending on the geometry of the lines, the nice “split line” tool may not work as expected. I made a topology to figure out where splits had gaps. ones that had gaps were removed from the set
- once split, was there mysteriously more or less than 5 segments per route? if so, toss
- for the good splits, I matched available good starts to determine order of the segments
- I salvaged the remaining “split-able” lines