3

I am using ArcGIS 10.3 for Desktop.

I have a shapefile with polylines connecting points. Instead of having one single polyline connecting two points, there exist a number of consecutive segments connected to each other (see image below).

These segments, however, have no field values in common, so if I wanted to use Dissolve to merge all of them together it would not work the way I expect.

Is there a way to assign a common field value to all the segments between two consecutive points? This way, Dissolve could be used effectively. I am open to any kind of solution, and would prefer a Python-based one, if available.

Visual example: all segments in between point A and point B should get a common field value, so that they can be later merged. This should apply to all segments in between any two points.

enter image description here

This question is not a duplicate of ArcGIS 10.3: How to merge lines divided by junction points?, which I myself have asked. Rather, this question is a precursor to it, if you like.

Screenshot of the real situation. Red dots are the equivalent of Points A and B, while the segments are recognizable by the junction points in green (there is a segment in between each pair of consecutive green dots). For each red dot, I want one single incoming and one single outgoing line.

enter image description here

8
  • Possible duplicate of ArcGIS 10.3: How to merge lines divided by junction points?
    – Adam Kara
    Commented May 23, 2016 at 11:07
  • it is not a duplicate. I have asked that question too, but since in the original shapefile I did not have common fields to assign to Dissolve, I figured out that a question was required.
    – FaCoffee
    Commented May 23, 2016 at 11:10
  • Do the segments have their end nodes in common? If so, use Dissolve with the Unsplit lines option (and Create Multipart unchecked). No need for a common attribute then.
    – Martin
    Commented May 23, 2016 at 11:12
  • As soon as I see diagrams like this and your earlier question I think about Linear Referencing / Dynamic Segmentation.
    – PolyGeo
    Commented May 23, 2016 at 11:20
  • @Martin I've tried your suggestion but the output is not what I want. Point A, B or C must be break points, e.g. the dissolve function should only operate in between them, and should in any way include them in the dissolving process. See my point?
    – FaCoffee
    Commented May 23, 2016 at 11:57

1 Answer 1

1

You could just give all lines a common attribute value, use dissolve to merge them, then use split-lines-at-points to recreate the segments between the red points.

2
  • 1
    Let's say it almost worked. Some red dots were bypassed in the split process, maybe because their position was not digitized perfectly (e.g., they were not positioned exactly on a line, but had some sort of offset instead). Anyway this is the best answer I got, and provided the original dataset is digitized with high accuracy, I am confident this procedure would return the best result.
    – FaCoffee
    Commented May 23, 2016 at 12:47
  • @CF84, You've accepted this as an answer but I was wondering in your image you have a red point out on the bottom-left, how has the dissolve resolved at the junction just north of the the most bottom red point. In your original image you are dissolving segments between 2 points without a junction between them. In your real world image you have multiple junctions between points, so what was the rule that was used to link say that red point out on the left to the red point in the middle or was it the bottom?
    – Hornbydd
    Commented May 23, 2016 at 16:14

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.