How to convert bearing, distance, xy coordinate measurements to point shapefile?

I have a natural resources dataset where individual seedlings in canopy gaps were recorded from a center "legacy tree" within each canopy gap. Each sapling has the following measurements associated with it:

1. Legacy tree GPS xy coordinates (i.e. a center location in the canopy gap)
2. Bearing to sapling from the legacy tree (e.g. 218 degrees)
3. Distance in meters from the legacy tree

There are thousands of these individual tree locations, so an automated approach would be best.

How can I convert this dataset into a point shapefile/featureclass? ArcGIS, Arcpy/Python and R solutions would be especially useful. Thanks.

-

The complex number support in python is a simple way to do operations against Cartesian coordinates. The cmath module provides a function that converts a distance and angle into a vector. This assumes that the coordinates are in a suitable projection.

``````import cmath
import math

x = 0
y = 0
angle = 0
distance = 100

#convert bearing to arithmetic angle in radians
angle = 90-angle
if angle<-180:
angle= 360+angle

start = complex(x,y)

movement = cmath.rect(distance,angle)

end = start+movement

endx = end.real
endy = end.imag
``````
-

you can use the function Bearing Distance To Line (Data Management) in Arctool box, or in Arcpy , it has as input a table containing coordinates , distances , and bearing measurements in degrees.

-