0

I want to build a tool where you provide coordinates, distance, and angle for input and it outputs coordinates, no feature necessary, using the distance and angle from the input coordinates.

How do I build this?

I am using ArcMap for desktop 10.4.1

closed as unclear what you're asking by xunilk, FelixIP, Hornbydd, Andre Silva, BERA Jan 6 '18 at 7:28

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • As per the Tour there should be no chit chat in questions asked here. For example, yours contained unnecessary verbiage like "My question is" and "Thanks" that I have removed. Please do not roll that back. Also, the first tag on any ArcMap question should be arcgis-desktop if you want your question to be seen by the ArcGIS Desktop product experts who use the ArcMap application. – PolyGeo Jan 12 '18 at 0:33
3

This python code will do it using sine and cosine. Python requires radians for trig functions so it converts your angle in degrees to radians first.

def Translate(X,Y,angle,distance):                #defines function
    # 0 degrees = North, 90 = East, 180 = South, 270 = West
    dY = distance*math.cos(math.radians(angle))   #change in y 
    dX = distance*math.sin(math.radians(angle))   #change in x 
    Xfinal = X + dX                               
    Yfinal = Y + dY
    return Xfinal, Yfinal
  • Can you explain why x uses cosine and y uses sine? I have seen this answer before on other questions and I can simply use the calculation but I do not understand why it is being done – ziggy Jan 11 '18 at 14:27
  • 1
    I have edited my answer. Cosine divides the coordinate adjacent to the angle over the total distance, Sine divides the coordinate opposite the angle by the total distance. I use python for both physics and geography and my answer was using the angles which are standard in physics with 0 degrees pointing to the right (+ x axis) and angles going counter clockwise. In geography 0 degrees points north (+ y axis) and angles go clockwise so the trig functions are reversed. dX = Dist * sin(Angle) and dY = Dist * cos(Angle). – Dylan Warburg Jan 15 '18 at 22:14
0

ArcGIS has a tool that does most of what you are after called Bearing Distance to Line. All you would need to do is extract the coordinates from the end point on the line created from the tool using a Search Cursor.

  • Yeah, but that outputs a feature, which I don't want. I just want an output box that displays the new coordinates – user104307 Jan 8 '18 at 15:49

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