Study Line Editor

8325
16
09-20-2015 06:04 PM

Study Line Editor

Hi All,

I got inspired by an Arcpy Cafe post to develop a tiny scripting tool that takes an existing polyline feature layer and proportionally splits into  a desired number of segments of equal length. This scripting tool will enable you to do batch editing based on either an input field or just split all the lines into segments of equal length. This tool WILL attempt to copy the fields from the original feature class.

I have since changed these tools so that they include more editing tools to assist with generating linear study geometries generally. These tools include:

  • Feature Line Split - create a new feature class that has input lines split into an arbitrary number of segments.

  • Feature Line Pull - create a new feature class that has input lines split pulled back a target length.

  • Feature Line Whiskers - create a new feature class that perpendicular lines generated based on the sampled headings of the input polylines.

  • Feature Line Corridor Assembly - will add corridor ids to an output line network for all lines that are parallel within a tolerance and spatially connected/contiguous.

For more info see the links below:

Github Repo for the tool is here: 

Download Link

GitHub - d-wasserman/study-line-editor: The goal of this toolbox is provide a set of batch line edit... 

Comments

Hi!

First I'd like to thank you for sharing this. I was looking for something that could do exactly this. I'll be testing it now.

But in the end I could only use it if the original feature classes fields are kept. Any predictions when that part might be implemented?

Cheers

Hi Julio,

I actually have recently had a breakthrough with modular functions to do just this using insert cursors. I will be uploading a new version of the tool this week that not only has copied fields, but also will split a feature by field ( you can have a field determine how many sections it gets split into). If you could please comment and provide feedback that would be great. I have noticed some issues with potentially non-sorted vertices creating issues by making some multiparts, but let me know if it works for you.

David

Hi David,

I ended up using the Densify option (followed by SplitLine) when using InterpolateShape which was quite a simple solution for my case, since it's a tool I needed to use anyway.

Densify lacks the control your tool offers so I'll try to test it when I finish my current project, that I hope it doesn't take too long.

Cheers

Hey Julio,

The split line at point workflow (either randomly generated or densified) works very well too. I really made this tool to get more control and to deal with overlapping lines/more exact split points a little better. I have not got the split line at point workflow to deal with lines that overlap very well (network routes, etc). I am glad you were able to find a solution for your project now. I would love input into the functioning of this tool and any bugs you encounter.

David

Thank you for sharing this is a great tool !!

Glad you found it helpful!

Hi David,

I need your help.
This tool is exactly what I'm needing in my project,  I need to cut lines every 10 kilometers. But I don´t know how to use it.

Could you tell me the steps to use the tool? I'm sorry, I'm new to python.
Thank you for your willingness to help me.

Hey Dalilia, 

There is a help document in the folder, but past that the main steps are to download the scripting tool and open the toolbox in ArcMap. You will see a scripting tool that you can connect to data. You can then experiment with the parameters in the scripting tool. This tool does not require any coding on your part. If you encounter any bugs, I am open to trying to fix them. Make sure to keep the releative location of the scripts folder and the toolbox the same. IE the toolbox should be in the same folder as the scripts folder. 

To cut the road every 10 KM WITHOUT Best Fit, you could unclick Best Fit, and assuming your projection is in meters set the segmentation number to 10000. You can also calculate the number of segments it needs to be as a field and use a different split method. If not this, densify with split line at vertices is another option. 

David

David,

I´m try use the tool, but the script does not appear in the toolbox. Look the pictures, please.

This picture show where I'm saved the files:

Save_Files

And this picture show the toolbox empty:

Add_Toolbox

Where am I going wrong?

I'm use the Arcgis 10.3

Thank you.

Hi Dalilia, 

The most recent upload to github has a back saved toolbox. Let me know if you have any further problems. When making updates I forgot to back save the toolbox after I uploaded it. Use the github DOWNLOAD link and you should be fine. If it gives you any further problems let me know. Your folder structure is fine, this was something I forgot to do. 

David

David,

The tool is working perfectly, I was able to execute successfully.
I'm very happy. Congratulations on creating the tool, it really is very useful.
Thank you for helping me.

Thanks for catching the Toolbox issue. Glad it works perfectly. Let me know if you get any other ideas for the tool. 😃

This is a great tool! Thank you so much!

Thanks Jonathan. Let me know if you run into any issues. 😃

thank you so much for sharing this! i successfully used this as a part of my analyses for a thesis. i'm now preparing a manuscript for publication and would like to cite this tool. i have asked many people about referencing something like this and so far everyone has suggested citing Python. is there a way you would like the tool referenced in publication?

Hi Christina, 

Glad you found it helpful! 

If you use the tool in academic research or as part of professional reports, please cite the rule as the following:

Wasserman, D. Feature Line Split. (2019) GitHub repository, GitHub https://github.com/d-wasserman/feature-line-split

Thanks!

David

Version history
Last update:
‎09-20-2015 06:04 PM
Updated by:
Contributors