2

I have a feature class with thousands of points. In the same table with these point locations, I have two additional fields. One for azimuth, and one for a length (or distance) to move along that azimuth in order to create a new point location. I am looking for guidance on a python script that would accomplish this task?

table example 
x y length_fornew_point azimuth 
400460.99 135836.76 5150.04 55.41 
.... ....

Ultimately the script would run through my table, look at the existing coordinates and create a new end point at corresponding specified distance/azimuth in the table.

These two coordinates would then be used to create a new two point polyline.

nmtoken
13.6k5 gold badges39 silver badges91 bronze badges
asked Apr 10, 2014 at 21:56
2
  • Do you have access to the arcpy site-package? Commented Apr 10, 2014 at 22:02
  • Hmmmm. How would I determine that? I'm using ArcGis 10.2 if that helps. Sorry. Commented Apr 10, 2014 at 22:04

1 Answer 1

5

ArcGIS has a tool to do just that called Bearing Distance To Line (Data Management).

enter image description here


The syntax is as follows (from ESRI help):

# Import system modules
import arcpy
from arcpy import env
# Local variables
input_table = r"c:\workspace\LOBtraffic.dbf"
output_fc = r"c:\workspace\SOPA.gdb\lob_traf001"
#BearingDistanceToLine
arcpy.BearingDistanceToLine_management(input_table, output_fc, "X", "Y", 
"NAUTICAL_MILES", "azim", "DEGREES", "GEODESIC","recnum")
answered Apr 10, 2014 at 22:05

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.