Hi everyone,
I’m working on a project using LiDAR data to scan lines, and I’ve run into a challenge I hope someone here can help with.
Long story short: the line wires were not connected, so I extended the parallel lines by 5m and generated points where the extended lines intersect. However, I’m now stuck trying to figure out how to cut the lines at these intersection points and remove the small, useless segments that were created by the extension.
Here’s an example image of the situation:
Does anyone have ideas or tips for automating this process using Python? Any help or pointers would be greatly appreciated!
P.s. I don’t have the license to use the Split Line At Point tool.
Thanks in advance!
Best regards,
GIS_Rookie
What you should be able to do is use the Split Line at Point tool. Select your line layer and the point layer that you created where the lines intersect. This will split the lines at each point. Then, you can just do a select by attribute based on the length column and delete any lines 5m or less (this is assuming that you don't have any legitimate lines that are 5m or less that you need to keep).
Thank you for the suggestion, but unfortunately, I don’t have the license to use the Split Line At Point tool. Is there a workaround for this? I’m open to using Python if that’s an option. Could you share the logic or steps I could follow to achieve the same result programmatically?
I'm sure there are workarounds.....but it's outside of my area of knowledge. If you don't have access to that tool, then I think you'll have to use Python. Here are a couple of links that might be helpful. Both links include a Python script that avoids using that tool because they don't have an advanced license.
I haven't tried using those scripts, but it might point you in the right direction.
If there isn't already a vertex where the lines cross you may be able to use the Snap tool to snap the endpoints of those two lines together. It only requires a standard license and has the added benefit of not needing to delete any dangling lines.