# Splitting loop links in ArcGIS Desktop?

How do you automatically split all loop links in a table with line objects?

A loop being one where first and last coordinate is the same.

Should be split at 50%.

-
What do you mean by loop link? That is a new term for me atleast. – Devdatta Tengshe Jun 27 '12 at 10:53
I suspect you'll get more responses if you post a sample of your data -- I'm still a bit confused on. – Roy Jun 27 '12 at 11:13
As already said: A line object where first and last coordinate is the same. A loop. A circle. OK? Example: (1,1) - (3,2) - (3,4) - (1,1). – Uffe Kousgaard Jun 27 '12 at 14:41
This is easy in AV 3.x: do you still use it? :-) – whuber Jun 27 '12 at 21:34
No. I don't use it anymore. – Uffe Kousgaard Jun 28 '12 at 6:51

Aka a linear ring - the precursor of a polygon... but HOW you want to split them still requires a bit more information. You say 50% but this, in itself is still a little vague. Do you mean half the enclosed area, half the length of the linear ring or must the split fall diametrically opposite the start/end coordinate? Does the orientation of the rings matter? Are the rings simple regular shapes?

Anyway, I will take a stab at this and assume that, by 50%, you simply mean half the length of the ring. If you don't need to make this a btach process, ESRI has a tool for this and an explaination here: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/into_an_equal_number_of_parts/001t000003vz000000/. In your case the number of parts should be set to 2, obviously.

Alternatively, a more complex approach, but one that lends itself to automation would be to use linear referencing: Make your data M-aware, iterate over the lines, get each line's length and set an M-value at the mid point, Finally split the lines based on their M-Values.

-
Yes, 50% of the length was the target (how can you even think of areas for polylines??), but your solution is for a single object at a time and I have a whole table where not all are rings. Testing is needed before the change is applied. – Uffe Kousgaard Jun 27 '12 at 21:31
Your polylines define closed areas. You were very specific on that point, so one must presume that the fact they are rings is of special importance to you and that led me to wonder whether the area enclosed by the line might therefore also be of importance. – MappaGnosis Jun 28 '12 at 8:41

Here is a ModelBuilder approach that works:

This creates a new feature class with just the closed polylines, split at their midpoint. Up to you whether you can use that or need to go further to update your original feature class in-place. Note that the tools involved require an ArcInfo level license.

Here's how it works:

1. Use Feature Vertices to Points with the `BOTH_ENDS` option to create a feature class with 2 points for each input line, one at each endpoint.
2. Use Add XY Coordinates to add fields with the coordinates of the endpoints.
3. Use Frequency with `ORIG_FID`, `POINT_X`, and `POINT_Y` for the frequency fields. This counts the unique occurrences of the combination of those 3 fields, which should always be 2 for the situation we're interested in.
4. Join the Frequency table to the original line feature layer.
5. Select those features that have a `FREQUENCY` of 2.
6. Use Feature Vertices to Points again, on the original feature layer (with the closed polylines now selected), this time with the `MID` option to create a feature class containing points for the midpoint of each closed polyline.
7. Use Split Line at Point to create a feature class with the selected closed polylines split at their midpoints.
-
The link to a screenshot is broken on this answer - perhaps it can be added afresh, or maybe just deleted. – PolyGeo Sep 20 '15 at 4:02