Ask A Cartographer

Line Bearing

January 14 2009 | 1 comment
Categories: ArcGIS Methods, Labeling, Map Data

Is there a way (without survey analysist) to create a line bearing from an existing line file? Once this has been created I was planning on joining the line bearing to a point feature so I can label the point feature with the rotation field defined by the line bearing?


Mapping Center Answer:

There is a tool in 9.3 called Calculate Geodesic Angle--it requires an ArcInfo license.

If that doesn't do what you need, you won't be set up an attribute with this information without writing a script to determine the bearings--though it is possible using either ArcObjects or Python.  The main issue is sorting out the possibilities for what your line dataset contains in terms of lines and rules for each case:

1.  Two-point lines--this is easy, just calculate the slope to determine the bearing.

2.  Three-plus-point polylines--do you want the first and last point?  Should you break these into segments?

3.  Multi-part polylines--meaning several non-coterminous line segments existing within the same feature--minimally you'd want to know when each feature's part count is greater than 1. Use the Multipart to Singlepart tool to fix this, but you'd also likely want to do some attribute management with the results.

Also, check ArcScripts to see if anyone has already done this or something like it.

Use editor posted by Christopher Mathers on Feb 16 2009 11:56AM
In the Editor toolbar options, go to the Units tab and change your Direction Type to Quadrant Bearing and your Direction Units to Degrees Minutes Seconds. Now just edit the line layer you're trying to extract the bearing from. Make sure you are snapping to edges of that layer and use the Sketch tool. Start a line snapped to the one in question and move up the line a little towards the point in question. The bearing should be in the lower left part of ArcMap for the line you are sketching which if snapping is working correctly is coincident with the other line.

You could also use Calculate Geometry on the line feature in its attribute table to find the starting and ending X and Y which can be used to find the angle with some basic math. XY pairs can also be taken from the Sketch properties dialog found on the Editor toolbar if you set your edit task to Modify Feature and then select the line.

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |