2

Using ArcPy, I'm trying to figure out how to draw perpendicular lines along my Streams feature class. I have a set of points, that are snapped to my stream centerline.

I've seen the "Generate Transects Along Line" tool and I think that will get me close, but I'm not sure how to define that I want the lines are drawn at the point locations, rather than a set interval. Here is an example of what I'm trying to accomplish:

enter image description here

1
4

Here is a link to a Github repository for an ArcGIS 10.x toolbox tool (and Python script) that will create perpendicular lines at user defined distances. Lines can be created at the midpoint, start node, end node, and either or both sides. If you want to create lines at midpoints the tool will look at the start and end node of that line and create the perpendicular line perpendicular to that imaginary line. Your lines will need to be using a projected coordinate reference system like UTM or State plane. All units of measure would be in the units of the CRS.

https://github.com/ShuksanGeomatics/Create_Perpendicular_Lines_ArcGIS

7
  • Interesting thanks! I could maybe split my lines at the points, then run the Create Perpendicular Lines at Start followed by the Create perp lines at End tools. Will try to figure out how to incorporate that into my existing script so it can all be done at once. Jun 11 '20 at 18:56
  • Yes, you would need to split your lines before using this tool.
    – GBG
    Jun 11 '20 at 21:18
  • Was able to implement the Start and End tools into my model and it works flawlessly. Thanks so much! Jun 12 '20 at 14:17
  • Any idea if this has been adapted for ArcGIS Pro (Python 3)? Jun 12 '20 at 15:08
  • 1
    This tool has been updated to work with ArcPro. See this link: github.com/gerry1138/Create-Perpendicular-Lines-ArcPro-Python3-
    – GBG
    Jun 12 '20 at 18:23
0

Although @GBG 's toolbox did work, I ended up using the Generate Transects Along Line tool since I wasn't concerned with which endpoint I wanted to create features. I split my lines at the points using the Split Line at Point tool then ran the Generate Transects Along Line tool using the 'END_POINTS' parameter. Leaving the other answer as accepted because it did solve my problem. But I wanted to provide another workflow in case anyone else is trying to accomplish this.

2
  • I would be interested in what error the script threw.
    – GBG
    Oct 6 '20 at 3:27
  • It did not throw an error. Actually worked as expected, so thanks again! I just ended up figuring out a workflow using out of the box tools. Oct 6 '20 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.