Construct perpendicular lines

10778
10
07-28-2013 07:54 PM
ColleenMortimer
New Contributor
I have a polyline and want to construct lines perpendicular to the polyline with a set spacing (make a line every n-meters). The polyline in question is not a straight line but it should still be possible to generate a line that crosses the polyline at a right angle. I tried a work-around using 'construct parallel' and 'construct points' but it did not work as I had hoped. Am using 10.1.
Tags (2)
Reply
0 Kudos
10 Replies
RichardFairhurst
MVP Honored Contributor
I have a polyline and want to construct lines perpendicular to the polyline with a set spacing (make a line every n-meters). The polyline in question is not a straight line but it should still be possible to generate a line that crosses the polyline at a right angle. I tried a work-around using 'construct parallel' and 'construct points' but it did not work as I had hoped. Am using 10.1.


Using Linear Referencing you can create two point events at each location along the line with a positive and negative side offset of the same distance.  Then use those two points with the Create Line From Points tool.  Excel ould probably build the table fairly quickly for one set of points with an even spacing down the line, then copy and past that and alter the side offset by making the negative value of the previous point offsets.
AnandRao
Occasional Contributor
Richard,

I am working on something similar. Trying to create two point events, unable to achieve this yet.
Where exactly should I use this positive and negative offset option?

Can you please explain a little bit? It will be much appreciated

Thanks

Regards
Anand
Reply
0 Kudos
RichardFairhurst
MVP Honored Contributor
Richard,

I am working on something similar. Trying to create two point events, unable to achieve this yet.
Where exactly should I use this positive and negative offset option?

Can you please explain a little bit? It will be much appreciated

Thanks

Regards
Anand


My method uses Linear Referencing for the creation of the point events.  When you use the Make Route Event Layer tool you must specify the RouteID and the Measure field for a point event.  Optionally you can specify a side offset field.  In your case you would create two side offset fields, one for a positive offset and the other for a negative offset.  So for example, if my offset field values are 30 and -30 then I can set up two layers to create points on either side of the line at that location that are offset 30 feet from the line to the left and right. 

Be sure to calculate a unique value that will not change when you copy features, such as a Long field that holds the original ObjectIDs of the events.  By exporting the events of one side to a point feature class and then appending the point events of the layer set to create points on the other side of the line I can create the two point events that will be at the specified distance along the line and offset perpendicular to that location at the desired distance.  Then the 2 Point line can use the event ID values to create the 2 point line.
Reply
0 Kudos
BondHarper
Occasional Contributor II
I've used this Python script before to do a similar task: http://arcscripts.esri.com/details.asp?dbid=15756

You can also use the construct cross-section tool on the HEC GeoRAS toolbar (but if you are not actually making cross sections for a hydraulic model, downloading that may be more trouble than it is worth).
Reply
0 Kudos
AnandRao
Occasional Contributor
My method uses Linear Referencing for the creation of the point events.  When you use the Make Route Event Layer tool you must specify the RouteID and the Measure field for a point event.  Optionally you can specify a side offset field.  In your case you would create two side offset fields, one for a positive offset and the other for a negative offset.  So for example, if my offset field values are 30 and -30 then I can set up two layers to create points on either side of the line at that location that are offset 30 feet from the line to the left and right. 

Be sure to calculate a unique value that will not change when you copy features, such as a Long field that holds the original ObjectIDs of the events.  By exporting the events of one side to a point feature class and then appending the point events of the layer set to create points on the other side of the line I can create the two point events that will be at the specified distance along the line and offset perpendicular to that location at the desired distance.  Then the 2 Point line can use the event ID values to create the 2 point line.


Thanks for your reply...that was useful
Reply
0 Kudos
AnandRao
Occasional Contributor
I've used this Python script before to do a similar task: http://arcscripts.esri.com/details.asp?dbid=15756

You can also use the construct cross-section tool on the HEC GeoRAS toolbar (but if you are not actually making cross sections for a hydraulic model, downloading that may be more trouble than it is worth).


Thanks for your reply.!
Reply
0 Kudos
GerryGabrisch
Occasional Contributor III

The link to the old create perpendicular lines tools referenced above is pointing to a deprecated version of the tool (one of my first stabs at Python).  The link below points to the most recent version, an ArcToolbox script,  which now allows the user to create perpendicular lines at the mid-point, the start point, or the end point of the line, and to the right/left/or both sides of the line.

GitHub - gerry1138/Create-Perpendicular-Lines: An ArcGIS ArcToolbox/Arcpy tool to create perpendicul... 

Reply
0 Kudos
AllanKapoor
New Contributor

Hi Gerry,


I need to create perpendicular lines at the midpoints of my line segments for my Master's thesis - looks like your tool will do the trick. However, the link you provided password protected. Can you please upload your tool to a public server like google drive, box, or github? Alternatively, I can pm you with my email address.

Thanks!

Reply
0 Kudos
GerryGabrisch
Occasional Contributor III

Allan,

Yes, my IT department shut down open access to that FTP site.  I moved the code and toolbox tool to Github.  The link above is now valid.

Reply
0 Kudos