3

I have been having trouble trying to come up with a python script that will go through a polyline feature class representing a river system and split all the streams intersecting with a central river at distance of 2km. The added difficulty is that any given stream can be made up of multiple polyline segments. Thus if a stream that intersects with the central river is made up of 2 line segments 1.5km long, the first would need to be unclipped, and the second after 0.5 km.

Does anyone have any suggestions on how to write a script that will accomplish this? I know positionAlongLine tool might help but I am not sure how to implement it.

enter image description here

asked Aug 26, 2015 at 2:42
8
  • "The added difficulty is that any given stream can be made up of multiple polyline segments." - Dissolving the stream segments into single features would be a good start to avoid that problem. Commented Aug 26, 2015 at 4:06
  • How is the central river designated? Can the tributaries fork as well? Commented Aug 26, 2015 at 6:56
  • Could you please illustrate on a picture how the polylines should be split and how you define the central river / streams (an attribute value?) Commented Aug 26, 2015 at 8:58
  • @Adam Thanks for the tip, dissolving them will definitely make things easier Commented Aug 27, 2015 at 3:57
  • @EmilBrundage The central river is designated by all the features sharing the rivers name in the attribute table. An yes the tributaries often do fork before 2km unfortunately Commented Aug 27, 2015 at 3:58

1 Answer 1

2

I don't think this question ever got resolved, I apologize Soupoder. The idea I have doesn't require arcpy.

1) Create a selection of central trunk rivers and export them as a separate feature class. Create a buffer around your central trunk rivers at 2km.

One

2) Use Feature to Line to split your side branches with the 2km buffer, adding both feature classes as "Input Features" in the tool.

Two

3) Since polylines from both the input side branches and buffer will be present in the tool output, Select by Location those lines that "share a line segment with" the original buffer feature class and delete them in Editor.

Three

You'll need an Advanced license for this workflow. Otherwise, we'll have to resort to some fancy arcpy to mimic the "Feature to Line", but let us know if this is the answer you were looking for.

answered Sep 6, 2015 at 20:12
1
  • Sorry for the late response, my office just got an upgraded advanced license and this workflow solved the problem nicely. Commented Nov 24, 2015 at 4:39

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.