Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 7 down vote accepted

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

angle = math.radians(angle)

start = complex(x,y)

movement = cmath.rect(distance,angle)

end = start+movement

endx = end.real
endy = end.imag
share|improve this answer

You can use the function Bearing Distance To Line (Data Management) in ArcToolbox, or in ArcPy. It has input for a table containing coordinates, distances, and bearing measurements in degrees.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.