# Calculate orthogonal Lines of a given Line

3466
10
11-18-2015 03:34 AM
Regular Contributor

Any ideas to do this. In arcpy?

In a given distance.

10 Replies
MVP Esteemed Contributor

You can get the normal (angle, point, distance) from the outputs of Near—Help | ArcGIS for Desktop and construct your normal segments accordingly...unless you want to do this in pure python?

Regular Contributor

Don't really get it? I would like to calculate cross direction profile of one line with a dem?

MVP Esteemed Contributor

a normal is a line at 90 degrees to another line as in a profile or cross-section etc.  Are you trying to create those? or are you just wanting lines across features?

MVP Esteemed Contributor

Occasional Contributor III

Are you trying to generate cross sections on a river centerline?

MVP Esteemed Contributor

Luke Sturtevant , I might like to do something like that if you have a link or suggestions.....not wanting to hijack this post though, so if not a simple link and/or that isn't what the OP wanted, I can branch off to another post.  That maybe will help on  a project I am doing now.

Occasional Contributor III

Rebecca the current tool I have is attached. The code definitely works and does the same thing that Darren's code does, but it is not as compact as his code. I'm definitely going to update the tool to incorporate his more concise coding. Anyway, the tool generates perpendicular cross sections and also ensures that all cross sections are pointing from left to right looking downstream.

On another note, I hope this kills two birds with one stone, but we have not heard from Johannes.

MVP Esteemed Contributor

Thanks Luke.  I'm going to check out both scripts, but my actual need might be more of a drainage/contour "parallel" flight line/transect.  I have thoughts on that already....project lead still trying to figure out what hereally wants.

As for Johannes....time zone might be different.

MVP Honored Contributor

If you have ET GeoWizards, the tool to generate perpendicular lines is Create Station Lines.

Or, you can use arcpy geometry objects, as outlined in this thread.